r55456 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r55455‎ | r55456 | r55457 >
Date:22:42, 21 August 2009
Author:brion
Status:ok
Tags:
Comment:
Revert r53600 "Add $wgSecondaryGoNamespace, used if an exact match is not found when pressing go - will try to find a match in a different namespace before performing a search."
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.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/search/SearchEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/search/SearchEngine.php
@@ -63,7 +63,7 @@
6464 * @return Title
6565 */
6666 public static function getNearMatch( $searchterm ) {
67 - global $wgContLang, $wgSecondaryGoNamespaces;
 67+ global $wgContLang;
6868
6969 $allSearchTerms = array($searchterm);
7070
@@ -88,14 +88,6 @@
8989 return $title;
9090 }
9191
92 - # If a match is not found in the main namespace look in secondary go namespaces.
93 - if( $wgSecondaryGoNamespaces && $title->getNamespace() == NS_MAIN ) {
94 - foreach( $wgSecondaryGoNamespaces as $ns ) {
95 - $title = Title::newFromText( $term, $ns );
96 - if( $title && $title->exists() ) return $title;
97 - }
98 - }
99 -
10092 # Now try all lower case (i.e. first letter capitalized)
10193 #
10294 $title = Title::newFromText( $wgContLang->lc( $term ) );
Index: trunk/phase3/includes/DefaultSettings.php
@@ -4128,15 +4128,7 @@
41294129 */
41304130 $wgAllowPrefChange = array();
41314131
4132 -/**
4133 - * If an exact match is not found, try to find a match in different namespaces
4134 - * before performing a search.
4135 - *
4136 - * Array: Ids of namespaces to attempt match in, in desired order.
4137 - */
4138 -$wgSecondaryGoNamespaces = null;
41394132
4140 -
41414133 /**
41424134 * Settings for incoming cross-site AJAX requests:
41434135 * Newer browsers support cross-site AJAX when the target resource allows requests
Index: trunk/phase3/RELEASE-NOTES
@@ -73,8 +73,6 @@
7474 to same server
7575 * $wgSpecialVersionExtended shows the extended version information besides
7676 PHP and database version.
77 -* $wgSecondaryGoNamespaces allows an arry of namespaces to be checked when the
78 - GO button is pressed, in addition to the main namespace.
7977 * (bug 19907) $wgCrossSiteAJAXdomains and $wgCrossSiteAJAXdomainExceptions added
8078 to control which external domains may access the API via cross-site AJAX.
8179 * $wgMaintenanceScripts for extensions to add their scripts to the default list
@@ -156,8 +154,6 @@
157155 * (bug 14201) Set $wgDBadminuser/$wgDBadminpassword during setup
158156 * (bug 18768) Remove AdminSettings requirements. Maintenance environment
159157 will still load it if it exists, but it's not required for anything
160 -* Added $wgSecondaryGoNamespaces, allowing an array of namespaces to be checked
161 - when the Go button is pressed in addition to the main namespace.
162158 * (bug 19900) The "listgrouprights-key" message is now wrapped in a div with
163159 class "mw-listgrouprights-key"
164160 * (bug 471) Allow RSS feeds for watchlist, using an opt-in security token

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r53600Add $wgSecondaryGoNamespace, used if an exact match is not found when pressin...minuteelectron14:45, 21 July 2009
r53618* Replace $wgSecondaryGoNamespace with $wgSecondaryGoNamespaces (taking an ar...minuteelectron20:18, 21 July 2009
r53672* Add release note for r53618.roberthl11:08, 23 July 2009

Status & tagging log