diff options
-rw-r--r-- | core/controllers/albums.php | 5 | ||||
-rw-r--r-- | core/controllers/photos.php | 5 | ||||
-rw-r--r-- | core/helpers/core_installer.php | 4 | ||||
-rw-r--r-- | modules/tag/controllers/tags.php | 5 |
4 files changed, 11 insertions, 8 deletions
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()); diff --git a/core/helpers/core_installer.php b/core/helpers/core_installer.php index 8f24b659..27f8782e 100644 --- a/core/helpers/core_installer.php +++ b/core/helpers/core_installer.php @@ -110,6 +110,10 @@ class core_installer { ->save(); access::add_item($root); + module::set_var("core", "active_theme", "default"); + module::set_var("core", "active_admin_theme", "default_admin"); + module::set_var("core", "page_size", 9); + module::set_version("core", 1); } } diff --git a/modules/tag/controllers/tags.php b/modules/tag/controllers/tags.php index 34474be5..304d9bd0 100644 --- a/modules/tag/controllers/tags.php +++ b/modules/tag/controllers/tags.php @@ -21,9 +21,8 @@ class Tags_Controller extends REST_Controller { protected $resource_type = "tag"; public function _show($tag) { - // @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", "tag", $theme_name); |