search by hash, from artanis
git-svn-id: file:///home/shish/svn/shimmie2/trunk@162 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
baf57f5c74
commit
f25ed214c6
1 changed files with 6 additions and 0 deletions
|
@ -132,6 +132,12 @@ class Database {
|
||||||
}
|
}
|
||||||
$img_search->append(new Querylet("AND (owner_id = $user_id)"));
|
$img_search->append(new Querylet("AND (owner_id = $user_id)"));
|
||||||
}
|
}
|
||||||
|
else if(preg_match("/hash=([0-9a-fA-F]*)/i",$term,$matches)) {
|
||||||
|
$hash = strtolower($matches[1]);
|
||||||
|
if(!is_null($hash)) {
|
||||||
|
$img_search->append(new Querylet("AND (hash = '$hash')"));
|
||||||
|
}
|
||||||
|
}
|
||||||
else {
|
else {
|
||||||
$term = str_replace("*", "%", $term);
|
$term = str_replace("*", "%", $term);
|
||||||
$term = str_replace("?", "_", $term);
|
$term = str_replace("?", "_", $term);
|
||||||
|
|
Reference in a new issue