From: Chad Horohoe Date: Wed, 10 Sep 2014 20:36:57 +0000 (-0700) Subject: Remove $wgGoToEdit functionality X-Git-Tag: 1.31.0-rc.0~13728^2 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22brouteur%22%2C%28%24id_rubrique%20?a=commitdiff_plain;h=43df36eceb6b1200b6d1eb6b42e8ef21c65a8832;p=lhc%2Fweb%2Fwiklou.git Remove $wgGoToEdit functionality SpecialSearchNogomatch can be used with a 1 liner to accomplish the same thing. In fact, there's an extension (BypassSearch) that already does this. Change-Id: I5d7e56ec6fe1110e29ac5c8ba5482b8fc2bf1956 --- diff --git a/RELEASE-NOTES-1.24 b/RELEASE-NOTES-1.24 index 13a0a6d18c..5079b76d26 100644 --- a/RELEASE-NOTES-1.24 +++ b/RELEASE-NOTES-1.24 @@ -71,6 +71,8 @@ production. will not send a rel=canonical pointing to a variant-neutral page, however we will send rel=alternate. * $wgResourceLoaderLESSFunctions has been deprecated and will be removed in the future. +* $wgGoToEdit has been removed. Use the SpecialSearchNogomatch hook for similar + functionality. === New features in 1.24 === * Added new hook WatchlistEditorBeforeFormRender, allowing subscribers to diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index 427f868183..21907e7ce4 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -5586,11 +5586,6 @@ $wgPreviewOnOpenNamespaces = array( NS_CATEGORY => true ); -/** - * Go button goes straight to the edit screen if the article doesn't exist. - */ -$wgGoToEdit = false; - /** * Enable the UniversalEditButton for browsers that support it * (currently only Firefox with an extension) diff --git a/includes/specials/SpecialSearch.php b/includes/specials/SpecialSearch.php index adc248eafa..88ab7d82f9 100644 --- a/includes/specials/SpecialSearch.php +++ b/includes/specials/SpecialSearch.php @@ -197,14 +197,6 @@ class SpecialSearch extends SpecialPage { $title = Title::newFromText( $term ); if ( !is_null( $title ) ) { wfRunHooks( 'SpecialSearchNogomatch', array( &$title ) ); - wfDebugLog( 'nogomatch', $title->getFullText(), 'private' ); - - # If the feature is enabled, go straight to the edit page - if ( $this->getConfig()->get( 'GoToEdit' ) ) { - $this->getOutput()->redirect( $title->getFullURL( array( 'action' => 'edit' ) ) ); - - return; - } } $this->showResults( $term ); }