From 50dceb50159c407629274352143f539d252bae6f Mon Sep 17 00:00:00 2001 From: Felix Rabinovich Date: Thu, 1 Jan 2009 18:56:06 +0000 Subject: Theme Administration implementation --- core/controllers/admin_themes.php | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 core/controllers/admin_themes.php (limited to 'core/controllers/admin_themes.php') diff --git a/core/controllers/admin_themes.php b/core/controllers/admin_themes.php new file mode 100644 index 00000000..5c9a2ad1 --- /dev/null +++ b/core/controllers/admin_themes.php @@ -0,0 +1,41 @@ +content = new View("admin_themes.html"); + $themes = scandir(THEMEPATH); + $view->content->themes = array_diff($themes, array(".", "..", ".svn")); + $view->content->active = module::get_var("core", "active_theme"); + print $view; + } + + public function save() { + access::verify_csrf(); + $theme = $this->input->post("theme"); + if ($theme != module::get_var("core", "active_theme")) { + module::set_var("core", "active_theme", $theme); + message::success(_("Updated Theme")); + log::success("graphics", sprintf(_("Changed theme to %s"), $theme)); + } + url::redirect("admin/themes"); + } +} + -- cgit v1.2.3