MediaWiki r35607 - Code Review

Jump to: navigation, search
Repository:MediaWiki
Revision:r35606‎ | r35607 (on ViewVC)‎ | r35608 >
Date:17:28, 30 May 2008
Author:brion
Status:old
Tags:
Comment:
apply the single-namespace hack from core prefix search... we can't do an efficient multi-namespace search with this db index currently
Modified paths:

Diff [purge]

Index: trunk/extensions/TitleKey/TitleKey_body.php
===================================================================
--- trunk/extensions/TitleKey/TitleKey_body.php	(revision 35606)
+++ trunk/extensions/TitleKey/TitleKey_body.php	(revision 35607)
@@ -185,7 +185,11 @@
 		return false;
 	}
 	
-	static function prefixSearch( $ns, $search, $limit ) {
+	static function prefixSearch( $namespaces, $search, $limit ) {
+		$ns = array_shift( $namespaces ); // support only one namespace
+		if( in_array( NS_MAIN, $namespaces ) )
+			$ns = NS_MAIN; // if searching on many always default to main 
+		
 		$key = self::normalize( $search );
 		
 		$dbr = wfGetDB( DB_SLAVE );

Status & tagging log

  • 15:27, 12 September 2011 Meno25 (Talk | contribs) changed the status of r35607 [removed: ok added: old]
Personal tools
Namespaces
Variants
Views
Actions
Site
Support
Download
Development
Communication
Toolbox