From ab008e351de2a0cd11245a22578089868e7260f1 Mon Sep 17 00:00:00 2001 From: Matthew Barbour Date: Wed, 15 Jul 2020 17:20:29 -0500 Subject: [PATCH] Added SPEED_HAX criteria to image count shortcuts. --- core/imageboard/image.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/imageboard/image.php b/core/imageboard/image.php index 9840e891..0082e240 100644 --- a/core/imageboard/image.php +++ b/core/imageboard/image.php @@ -226,10 +226,10 @@ class Image global $cache, $database; $tag_count = count($tags); - if ($tag_count === 0) { + if (SPEED_HAX && $tag_count === 0) { // total number of images in the DB $total = self::count_total_images(); - } elseif ($tag_count === 1 && !preg_match("/[:=><\*\?]/", $tags[0])) { + } elseif (SPEED_HAX && $tag_count === 1 && !preg_match("/[:=><\*\?]/", $tags[0])) { if (!startsWith($tags[0], "-")) { // one tag - we can look that up directly $total = self::count_tag($tags[0]);