search by poster name
git-svn-id: file:///home/shish/svn/shimmie2/trunk@118 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
parent
0c30124dbd
commit
c486fe279c
1 changed files with 11 additions and 0 deletions
|
@ -121,6 +121,17 @@ class Database {
|
|||
$val = parse_shorthand_int($matches[3]);
|
||||
$img_search->append(new Querylet("AND ($col $cmp $val)"));
|
||||
}
|
||||
else if(preg_match("/poster=(.*)/i", $term, $matches)) {
|
||||
global $database;
|
||||
$user = $database->get_user_by_name($matches[1]);
|
||||
if(!is_null($user)) {
|
||||
$user_id = $user->id;
|
||||
}
|
||||
else {
|
||||
$user_id = -1;
|
||||
}
|
||||
$img_search->append(new Querylet("AND (owner_id = $user_id)"));
|
||||
}
|
||||
else {
|
||||
$term = str_replace("*", "%", $term);
|
||||
$term = str_replace("?", "_", $term);
|
||||
|
|
Reference in a new issue