From e346a8e57c5e210996e832f11bb0963f1e4a5d12 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Sun, 27 Oct 2013 23:02:15 +0100 Subject: [PATCH] Added new search keywords - tagmin, tagmax - commentmin, commentmax --- src/Controllers/PostController.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Controllers/PostController.php b/src/Controllers/PostController.php index fc3adfac..241e90d6 100644 --- a/src/Controllers/PostController.php +++ b/src/Controllers/PostController.php @@ -846,6 +846,18 @@ class PostController $dbQuery->$andFunc('fav_count ' . $operator . ' ?')->put(intval($val)); break; + case 'tagmin': + case 'tagmax': + $operator = $key == 'tagmin' ? '>=' : '<='; + $dbQuery->$andFunc('tag_count ' . $operator . ' ?')->put(intval($val)); + break; + + case 'commentmin': + case 'commentmax': + $operator = $key == 'commentmin' ? '>=' : '<='; + $dbQuery->$andFunc('comment_count ' . $operator . ' ?')->put(intval($val)); + break; + case 'type': switch ($val) {