r82895 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82894‎ | r82895 | r82896 >
Date:15:43, 27 February 2011
Author:maxsem
Status:ok
Tags:
Comment:
Return sooner if there's nothing to replace
Modified paths:
  • /trunk/extensions/MWSearch/MWSearch_body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/MWSearch/MWSearch_body.php
@@ -64,9 +64,6 @@
6565 global $wgContLang, $wgLuceneUseRelated;
6666 $fname = 'LuceneSearch::replacePrefixes';
6767 wfProfileIn($fname);
68 -
69 - // "search everything" keyword
70 - $allkeyword = wfMsgForContent('searchall');
7168
7269 // quick check, most of the time we don't need any rewriting
7370 if(strpos($query,':')===false){
@@ -74,6 +71,9 @@
7572 return $query;
7673 }
7774
 75+ // "search everything" keyword
 76+ $allkeyword = wfMsgForContent('searchall');
 77+
7878 // check if this is query for related articles
7979 $relatedkey = wfMsgForContent('searchrelated').':';
8080 if($wgLuceneUseRelated && strncmp($query, $relatedkey, strlen($relatedkey)) == 0){

Status & tagging log