diff options
author | Bharat Mediratta <bharat@menalto.com> | 2008-11-05 06:17:35 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-05 06:17:35 +0000 |
commit | 00513a71d2091eba3110164e506c2231972a1584 (patch) | |
tree | 38c8304f959a5c5ec247338f0f3364ed1c3fb7b0 /core | |
parent | 772239206b11c0578228c663d8bcdbd2145c6f0a (diff) |
Report the number of photos/albums
Diffstat (limited to 'core')
-rw-r--r-- | core/controllers/welcome.php | 8 | ||||
-rw-r--r-- | core/views/welcome.html.php | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index adce7443..1c90842c 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -24,6 +24,14 @@ class Welcome_Controller extends Template_Controller { $this->template->syscheck = new View("welcome_syscheck.html"); $this->template->syscheck->errors = $this->_get_config_errors(); $this->template->syscheck->modules = $this->_read_modules(); + $this->template->album_count = 0; + $this->template->photo_count = 0; + try { + $this->template->album_count = ORM::factory("item")->where("type", "album")->count_all(); + $this->template->photo_count = ORM::factory("item")->where("type", "photo")->count_all(); + } catch (Exception $e) { + } + $this->_create_directories(); } diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php index 680f0aa6..28e18023 100644 --- a/core/views/welcome.html.php +++ b/core/views/welcome.html.php @@ -148,7 +148,10 @@ </div> <div id="actions" class="activity"> - <p> <?= html::anchor("album/1", "Browse Gallery") ?> </p> + <p> + <?= html::anchor("album/1", "Browse Gallery") ?> + <i>(<?= $album_count ?> albums, <?= $photo_count ?> photos)</i> + </p> <ul class="choices"> <li> add: [</li> <? foreach (array(1, 10, 50, 100, 500, 1000) as $count): ?> |