From 33a7fde1a4acf47a5f6e801ea00971ec0a8c5b6a Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 30 Jul 2009 03:27:40 +0100 Subject: [PATCH] make search by favourite count work --- contrib/favorites/main.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/favorites/main.php b/contrib/favorites/main.php index c60f2864..f987a71c 100644 --- a/contrib/favorites/main.php +++ b/contrib/favorites/main.php @@ -95,7 +95,7 @@ class Favorites extends SimpleExtension { if(preg_match("/favorites(<|>|<=|>=|=)(\d+)/", $event->term, $matches)) { $cmp = $matches[1]; $favorites = $matches[2]; - $event->set_querylet(new Querylet("favorites $cmp $favorites")); + $event->add_querylet(new Querylet("images.id IN (SELECT id FROM images WHERE favorites $cmp $favorites)")); } else if(preg_match("/favorited_by=(.*)/i", $event->term, $matches)) { global $database;