From 96b533f1b2fe4e01d7dd7e98631833c2e3c13a71 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 13 Jun 2009 12:42:01 +0800 Subject: Don't count the root as an album in the stats block. It'll just confuse our users. Fixes ticket #369 Signed-off-by: --- modules/gallery/helpers/gallery_block.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index 67900282..c3837f54 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -56,7 +56,8 @@ class gallery_block_Core { $block->css_id = "gStats"; $block->title = t("Gallery Stats"); $block->content = new View("admin_block_stats.html"); - $block->content->album_count = ORM::factory("item")->where("type", "album")->count_all(); + $block->content->album_count = + ORM::factory("item")->where("type", "album")->where("id <>", 1)->count_all(); $block->content->photo_count = ORM::factory("item")->where("type", "photo")->count_all(); break; -- cgit v1.2.3