From 43df36eceb6b1200b6d1eb6b42e8ef21c65a8832 Mon Sep 17 00:00:00 2001 From: Chad Horohoe Date: Wed, 10 Sep 2014 13:36:57 -0700 Subject: [PATCH] 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 --- RELEASE-NOTES-1.24 | 2 ++ includes/DefaultSettings.php | 5 ----- includes/specials/SpecialSearch.php | 8 -------- 3 files changed, 2 insertions(+), 13 deletions(-) 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 ); } -- 2.20.1