Fixed to prevent the search on no available keywords.

This commit is contained in:
Loic d'Anterroches 2009-08-20 15:20:15 +02:00
parent 14e074b122
commit c1e23ae9e2

View File

@ -59,7 +59,7 @@ class IDF_Search extends Pluf_Search
$words_flat[] = $word; $words_flat[] = $word;
} }
$word_ids = self::getWordIds($words_flat); $word_ids = self::getWordIds($words_flat);
if (in_array(null, $word_ids)) { if (in_array(null, $word_ids) or count($word_ids) == 0) {
return array(); return array();
} }
return self::mySearchDocuments($word_ids, $project, $model); return self::mySearchDocuments($word_ids, $project, $model);