Revert r53600 "Add $wgSecondaryGoNamespace, used if an exact match is not found when...
authorBrion Vibber <brion@users.mediawiki.org>
Fri, 21 Aug 2009 22:42:09 +0000 (22:42 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Fri, 21 Aug 2009 22:42:09 +0000 (22:42 +0000)
Revert r53618 "* Replace $wgSecondaryGoNamespace with $wgSecondaryGoNamespaces (taking an array of integers instead of just an integer), per code review of r53600."
Revert r53672 "* Add release note for r53618."
Per bug 11380 this should probably be using the default search namespaces or the user's search namespaces; an additional config array seems unnecessary.

RELEASE-NOTES
includes/DefaultSettings.php
includes/search/SearchEngine.php

index f70a36f..e309120 100644 (file)
@@ -73,8 +73,6 @@ this. Was used when mwEmbed was going to be an extension.
   to same server
 * $wgSpecialVersionExtended shows the extended version information besides 
   PHP and database version.
-* $wgSecondaryGoNamespaces allows an arry of namespaces to be checked when the
-  GO button is pressed, in addition to the main namespace.
 * (bug 19907) $wgCrossSiteAJAXdomains and $wgCrossSiteAJAXdomainExceptions added 
   to control which external domains may access the API via cross-site AJAX.
 * $wgMaintenanceScripts for extensions to add their scripts to the default list
@@ -156,8 +154,6 @@ this. Was used when mwEmbed was going to be an extension.
 * (bug 14201) Set $wgDBadminuser/$wgDBadminpassword during setup
 * (bug 18768) Remove AdminSettings requirements. Maintenance environment
   will still load it if it exists, but it's not required for anything
-* Added $wgSecondaryGoNamespaces, allowing an array of namespaces to be checked
-  when the Go button is pressed in addition to the main namespace.
 * (bug 19900) The "listgrouprights-key" message is now wrapped in a div with
   class "mw-listgrouprights-key"
 * (bug 471) Allow RSS feeds for watchlist, using an opt-in security token
index fe24633..2b3e7cb 100644 (file)
@@ -4128,14 +4128,6 @@ $wgAutocreatePolicy = 'login';
  */
 $wgAllowPrefChange = array();
 
-/**
- * If an exact match is not found, try to find a match in different namespaces
- * before performing a search.
- *
- * Array: Ids of namespaces to attempt match in, in desired order.
- */
-$wgSecondaryGoNamespaces = null;
-
 
 /**
  * Settings for incoming cross-site AJAX requests:
index aab14cb..daec7ca 100644 (file)
@@ -63,7 +63,7 @@ class SearchEngine {
         * @return Title
         */
        public static function getNearMatch( $searchterm ) {
-               global $wgContLang, $wgSecondaryGoNamespaces;
+               global $wgContLang;
 
                $allSearchTerms = array($searchterm);
 
@@ -88,14 +88,6 @@ class SearchEngine {
                                return $title;
                        }
 
-                       # If a match is not found in the main namespace look in secondary go namespaces.
-                       if( $wgSecondaryGoNamespaces && $title->getNamespace() == NS_MAIN ) {
-                               foreach( $wgSecondaryGoNamespaces as $ns ) {
-                                       $title = Title::newFromText( $term, $ns );
-                                       if( $title && $title->exists() ) return $title;
-                               }
-                       }
-
                        # Now try all lower case (i.e. first letter capitalized)
                        #
                        $title = Title::newFromText( $wgContLang->lc( $term ) );