ignore wildcard-only searches
git-svn-id: file:///home/shish/svn/shimmie2/trunk@589 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
e6891f7da9
commit
b48cd81da5
1 changed files with 6 additions and 4 deletions
|
@ -174,12 +174,14 @@ class Database {
|
|||
else {
|
||||
$term = str_replace("*", "%", $term);
|
||||
$term = str_replace("?", "_", $term);
|
||||
if(!preg_match("/^[%_]+$/", $term)) {
|
||||
$sign = $negative ? "-" : "+";
|
||||
if($sign == "+") $positive_tag_count++;
|
||||
else $negative_tag_count++;
|
||||
$tag_search->append(new Querylet(" $sign (tag LIKE ?)", array($term)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($positive_tag_count + $negative_tag_count == 0) {
|
||||
$query = new Querylet($this->get_images);
|
||||
|
|
Reference in a new issue