From 02486f2401b072fb3f5f2a50e68afaf2db9368d3 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 23 Nov 2008 20:31:43 +0000 Subject: Show the # of comments --- core/controllers/welcome.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'core/controllers') diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index 80aa2f8c..d8c69f97 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -26,6 +26,7 @@ class Welcome_Controller extends Template_Controller { $this->template->syscheck->modules = array(); $this->template->album_count = 0; $this->template->photo_count = 0; + $this->template->comment_count = 0; $this->template->deepest_photo = null; try { $old_handler = set_error_handler(array("Welcome_Controller", "_error_handler")); @@ -36,6 +37,12 @@ class Welcome_Controller extends Template_Controller { ->where("type", "photo")->orderby("level", "desc")->find(); } catch (Exception $e) { } + + try { + $this->template->comment_count = ORM::factory("comment")->count_all(); + } catch (Exception $e) { + } + set_error_handler($old_handler); $this->_create_directories(); -- cgit v1.2.3