From 8c713af952b2dd30120b466f47c8904b23b39ad7 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 23 Jul 2020 11:17:23 +0100 Subject: [PATCH] remove custom DB for untags now that we use microcrud --- ext/not_a_tag/main.php | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/ext/not_a_tag/main.php b/ext/not_a_tag/main.php index 795059a5..74f5dbf0 100644 --- a/ext/not_a_tag/main.php +++ b/ext/not_a_tag/main.php @@ -133,30 +133,4 @@ class NotATag extends Extension } } } - - public function get_untags(int $page, int $size=100): array - { - global $database; - - // FIXME: many - $where = ["(1=1)"]; - $args = ["limit"=>$size, "offset"=>($page-1)*$size]; - if (!empty($_GET['tag'])) { - $where[] = 'LOWER(tag) LIKE LOWER(:tag)'; - $args["tag"] = "%".$_GET['tag']."%"; - } - if (!empty($_GET['redirect'])) { - $where[] = 'LOWER(redirect) LIKE LOWER(:redirect)'; - $args["redirect"] = "%".$_GET['redirect']."%"; - } - $where = implode(" AND ", $where); - return $database->get_all(" - SELECT * - FROM untags - WHERE $where - ORDER BY tag - LIMIT :limit - OFFSET :offset - ", $args); - } }