diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-26 11:24:50 -0800 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-12-26 11:24:50 -0800 |
| commit | 3060a6f662da66008d57a461bf1c9b5b4aa2b002 (patch) | |
| tree | 442fd290505817efc0324f2af6e01805cb7396aa /modules/gallery/helpers/gallery_block.php | |
| parent | 1cd6a615bb47a33794e4a4f690c87a348ab752d7 (diff) | |
| parent | 32d25dafd5b033338b6a9bb8c7c53edab462543a (diff) | |
Merge branch 'master' into talmdal_dev
Conflicts:
modules/gallery/controllers/albums.php
modules/gallery/controllers/movies.php
modules/gallery/controllers/photos.php
Diffstat (limited to 'modules/gallery/helpers/gallery_block.php')
| -rw-r--r-- | modules/gallery/helpers/gallery_block.php | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/modules/gallery/helpers/gallery_block.php b/modules/gallery/helpers/gallery_block.php index b5c32ad2..9d4e81b6 100644 --- a/modules/gallery/helpers/gallery_block.php +++ b/modules/gallery/helpers/gallery_block.php @@ -34,7 +34,7 @@ class gallery_block_Core { static function get($block_id) { $block = new Block(); - switch($block_id) { + switch ($block_id) { case "welcome": $block->css_id = "g-welcome"; $block->title = t("Welcome to Gallery 3"); @@ -45,8 +45,8 @@ class gallery_block_Core { $block->css_id = "g-photo-stream"; $block->title = t("Photo stream"); $block->content = new View("admin_block_photo_stream.html"); - $block->content->photos = - ORM::factory("item")->where("type", "photo")->orderby("created", "DESC")->find_all(10); + $block->content->photos = ORM::factory("item") + ->where("type", "=", "photo")->order_by("created", "DESC")->find_all(10); break; case "log_entries": @@ -54,7 +54,7 @@ class gallery_block_Core { $block->title = t("Log entries"); $block->content = new View("admin_block_log_entries.html"); $block->content->entries = ORM::factory("log") - ->orderby(array("timestamp" => "DESC", "id" => "DESC"))->find_all(5); + ->order_by(array("timestamp" => "DESC", "id" => "DESC"))->find_all(5); break; case "stats": @@ -62,8 +62,8 @@ class gallery_block_Core { $block->title = t("Gallery stats"); $block->content = new View("admin_block_stats.html"); $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(); + ORM::factory("item")->where("type", "=", "album")->where("id", "<>", 1)->count_all(); + $block->content->photo_count = ORM::factory("item")->where("type", "=", "photo")->count_all(); break; case "platform_info": @@ -101,8 +101,7 @@ class gallery_block_Core { $block->css_id = "g-user-language-block"; $block->title = t("Language preference"); $block->content = new View("user_languages_block.html"); - $block->content->installed_locales = - array_merge(array("" => t("« none »")), $locales); + $block->content->installed_locales = array_merge(array("" => t("« none »")), $locales); $block->content->selected = (string) locales::cookie_locale(); } else { $block = ""; |
