http://www.mediawiki.org/wiki/Special:Code/MediaWiki/82895

Revision: 82895
Author:   maxsem
Date:     2011-02-27 15:43:15 +0000 (Sun, 27 Feb 2011)
Log Message:
-----------
Return sooner if there's nothing to replace

Modified Paths:
--------------
    trunk/extensions/MWSearch/MWSearch_body.php

Modified: trunk/extensions/MWSearch/MWSearch_body.php
===================================================================
--- trunk/extensions/MWSearch/MWSearch_body.php 2011-02-27 15:30:35 UTC (rev 
82894)
+++ trunk/extensions/MWSearch/MWSearch_body.php 2011-02-27 15:43:15 UTC (rev 
82895)
@@ -64,9 +64,6 @@
                global $wgContLang, $wgLuceneUseRelated;
                $fname = 'LuceneSearch::replacePrefixes';
                wfProfileIn($fname);
-
-               // "search everything" keyword
-               $allkeyword = wfMsgForContent('searchall');                     
                
                // quick check, most of the time we don't need any rewriting
                if(strpos($query,':')===false){ 
@@ -74,6 +71,9 @@
                        return $query;
                }
 
+               // "search everything" keyword
+               $allkeyword = wfMsgForContent('searchall');
+
                // check if this is query for related articles
                $relatedkey = wfMsgForContent('searchrelated').':';
                if($wgLuceneUseRelated && strncmp($query, $relatedkey, 
strlen($relatedkey)) == 0){


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to