From 942dbe175ca1697c0cca99fb7aae03de6ca398e0 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Fri, 12 Dec 2008 19:39:38 +0000 Subject: Remove a couple of todo's by store the "theme name", "admin theme name" and "page size" in the vars table and initializing when the core module is installed --- core/controllers/albums.php | 5 ++--- core/controllers/photos.php | 5 +++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'core/controllers') diff --git a/core/controllers/albums.php b/core/controllers/albums.php index 1977003b..48cbe410 100644 --- a/core/controllers/albums.php +++ b/core/controllers/albums.php @@ -27,9 +27,8 @@ class Albums_Controller extends Items_Controller { return Kohana::show_404(); } - // @todo: these need to be pulled from the database - $theme_name = "default"; - $page_size = 9; + $theme_name = module::get_var("core", "active_theme", "default"); + $page_size = module::set_var("core", "page_size", 9); $template = new Theme_View("page.html", "album", $theme_name); diff --git a/core/controllers/photos.php b/core/controllers/photos.php index c72fae12..5159d66f 100644 --- a/core/controllers/photos.php +++ b/core/controllers/photos.php @@ -27,8 +27,9 @@ class Photos_Controller extends Items_Controller { return Kohana::show_404(); } - // @todo: this needs to be data-driven - $template = new Theme_View("page.html", "photo", "default"); + $theme_name = module::get_var("core", "active_theme", "default"); + + $template = new Theme_View("page.html", "photo", $theme_name); $template->set_global('item', $item); $template->set_global('children', $item->children()); -- cgit v1.2.3