From 24c2311cba32189114079953cca616b55ad0986e Mon Sep 17 00:00:00 2001 From: shish Date: Mon, 22 Oct 2007 00:40:10 +0000 Subject: [PATCH] md5: search for danbooru compatability git-svn-id: file:///home/shish/svn/shimmie2/trunk@556 7f39781d-f577-437e-ae19-be835c7a54ca --- core/database.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/database.class.php b/core/database.class.php index 61752304..74a66712 100644 --- a/core/database.class.php +++ b/core/database.class.php @@ -160,8 +160,8 @@ class Database { } $img_search->append(new Querylet("AND (images.owner_id = $user_id)")); } - else if(preg_match("/hash=([0-9a-fA-F]*)/i",$term,$matches)) { - $hash = strtolower($matches[1]); + else if(preg_match("/(hash=|md5:)([0-9a-fA-F]*)/i",$term,$matches)) { + $hash = strtolower($matches[2]); if(!is_null($hash)) { $img_search->append(new Querylet("AND (images.hash = '$hash')")); }