match better, so user_id=123 doesn't hit id=123

This commit is contained in:
Shish
2009-01-21 23:04:29 -08:00
parent ddaa85583e
commit 2c37ce9a8d
5 changed files with 12 additions and 12 deletions

View File

@ -58,7 +58,7 @@ class DanbooruApi implements Extension
if($event instanceof SearchTermParseEvent)
{
$matches = array();
if(preg_match("/md5:([0-9a-fA-F]*)/i", $event->term, $matches))
if(preg_match("/^md5:([0-9a-fA-F]*)$/i", $event->term, $matches))
{
$hash = strtolower($matches[1]);
$event->set_querylet(new Querylet("images.hash = '$hash'"));