r5487 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r5486‎ | r5487 | r5488 >
Date:09:57, 25 September 2004
Author:kateturner
Status:old
Tags:
Comment:
disallow empty searches
Modified paths:
  • /trunk/phase3/includes/SearchEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SearchEngine.php
@@ -250,6 +250,9 @@
251251
252252 function parseQuery() {
253253 global $wgDBmysql4;
 254+ if (strlen($this->filteredText) < 1)
 255+ return MW_SEARCH_BAD_QUERY;
 256+
254257 if( $wgDBmysql4 ) {
255258 # Use cleaner boolean search if available
256259 return $this->parseQuery4();

Status & tagging log