filename search

git-svn-id: file:///home/shish/svn/shimmie2/trunk@799 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-04-11 05:06:37 +00:00
parent 09f768afdd
commit 7a6ccf11de

View file

@ -106,6 +106,10 @@ class Index extends Extension {
$ext = strtolower($matches[2]); $ext = strtolower($matches[2]);
$event->set_querylet(new Querylet("AND (images.ext = '$ext')")); $event->set_querylet(new Querylet("AND (images.ext = '$ext')"));
} }
else if(preg_match("/(filename|name)=([a-zA-Z0-9]*)/i", $event->term, $matches)) {
$filename = strtolower($matches[2]);
$event->set_querylet(new Querylet("AND (images.filename LIKE '%$filename%')"));
}
} }
} }
} }