diff options
-rw-r--r-- | core/helpers/core_block.php | 2 | ||||
-rw-r--r-- | core/views/admin_block_stats.html.php | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php index 571453a0..0e9ee27b 100644 --- a/core/helpers/core_block.php +++ b/core/helpers/core_block.php @@ -63,6 +63,8 @@ class core_block_Core { $block->id = "gStats"; $block->title = _("Gallery Stats"); $block->content = new View("admin_block_stats.html"); + $block->content->album_count = ORM::factory("item")->where("type", "album")->count_all(); + $block->content->photo_count = ORM::factory("item")->where("type", "photo")->count_all(); $blocks[] = $block; $block = new Block(); diff --git a/core/views/admin_block_stats.html.php b/core/views/admin_block_stats.html.php index af427323..2b38c060 100644 --- a/core/views/admin_block_stats.html.php +++ b/core/views/admin_block_stats.html.php @@ -1,5 +1,12 @@ <? defined("SYSPATH") or die("No direct script access."); ?> <ul> - <li>Version: 3.0</li> - <li>Your gallery has 34 albums containing 603 photos with 26 comments.</li> + <li> + <? printf(_("Version: %s"), "3.0") ?> + </li> + <li> + <? printf(_("Albums: %d"), $album_count) ?> + </li> + <li> + <? printf(_("Photos: %d"), $photo_count) ?> + </li> </ul> |