r5488 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5487‎ | r5488 | r5489 >
Date:10:02, 25 September 2004
Author:kateturner
Status:old
Tags:
Comment:
don't allow empty searches
Modified paths:
  • /branches/REL1_3/phase3/includes/SearchEngine.php (modified) (history)

Diff [purge]

Index: branches/REL1_3/phase3/includes/SearchEngine.php
@@ -298,6 +298,9 @@
299299 {
300300 global $wgDBminWordLen, $wgLang, $wgDBmysql4;
301301
 302+ if (strlen($this->mUsertext) < 1)
 303+ return MW_SEARCH_BAD_QUERY;
 304+
302305 if( $wgDBmysql4 ) {
303306 # Use cleaner boolean search if available
304307 return $this->parseQuery4();

Status & tagging log