Remove $wgGoToEdit functionality
authorChad Horohoe <chadh@wikimedia.org>
Wed, 10 Sep 2014 20:36:57 +0000 (13:36 -0700)
committerKunal Mehta <legoktm@gmail.com>
Mon, 22 Sep 2014 17:49:02 +0000 (10:49 -0700)
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

RELEASE-NOTES-1.24
includes/DefaultSettings.php
includes/specials/SpecialSearch.php

index 13a0a6d..5079b76 100644 (file)
@@ -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
index 427f868..21907e7 100644 (file)
@@ -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)
index adc248e..88ab7d8 100644 (file)
@@ -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 );
        }