From 9b98e6c90a98d5c14bb21cb796a6f7af3e52bda6 Mon Sep 17 00:00:00 2001 From: Shish Date: Thu, 11 Feb 2010 11:06:30 +0000 Subject: [PATCH] Use Image::count_images() rather than SQL, to take advantage of advanced features and caching --- contrib/home/main.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/contrib/home/main.php b/contrib/home/main.php index 380357e8..9338e3ee 100644 --- a/contrib/home/main.php +++ b/contrib/home/main.php @@ -64,14 +64,12 @@ class Home extends SimpleExtension { $contact_link = $config->get_string('contact_link'); $counter_dir = $config->get_string('home_counter', 'default'); - $total = ceil($database->db->GetOne("SELECT COUNT(*) FROM images")); + $total = Image::count_images(); $strtotal = "$total"; - $num_comma = number_format($total); $counter_text = ""; - for($n=0; $n