summaryrefslogtreecommitdiff
path: root/core/controllers
diff options
context:
space:
mode:
Diffstat (limited to 'core/controllers')
-rw-r--r--core/controllers/admin_themes.php27
1 files changed, 15 insertions, 12 deletions
diff --git a/core/controllers/admin_themes.php b/core/controllers/admin_themes.php
index e03e9870..26ed86a6 100644
--- a/core/controllers/admin_themes.php
+++ b/core/controllers/admin_themes.php
@@ -19,23 +19,26 @@
*/
class Admin_Themes_Controller extends Admin_Controller {
public function index() {
- $view = new Admin_View("admin.html");
- $view->content = new View("admin_themes.html");
- $themeDir = scandir(THEMEPATH);
+ $theme_dir = scandir(THEMEPATH);
$themes = $admin_themes = array();
- foreach ($themeDir as $theme_name) {
- if (substr($theme_name, 0, 1) == ".") continue;
- $file = THEMEPATH . $theme_name . "/theme.info";
+ foreach ($theme_dir as $theme_name) {
+ if (substr($theme_name, 0, 1) == ".") {
+ continue;
+ }
+
+ $file = THEMEPATH . $theme_name . "/theme.info";
$theme_info = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS);
$details = theme::get_edit_form_admin($theme_info);
$theme_info['details'] = $details;
- if ($theme_info->regular) {
- $themes[$theme_name] = $theme_info;
- }
if ($theme_info->admin) {
- $admin_themes[$theme_name] = $theme_info;
+ $admin_themes[$theme_name] = $theme_info;
+ } else {
+ $themes[$theme_name] = $theme_info;
}
}
+
+ $view = new Admin_View("admin.html");
+ $view->content = new View("admin_themes.html");
$view->content->themes = $themes;
$view->content->admin_themes = $admin_themes;
$view->content->active = module::get_var("core", "active_theme");
@@ -44,11 +47,11 @@ class Admin_Themes_Controller extends Admin_Controller {
}
public function edit($theme_name) {
- $file = THEMEPATH . $theme_name . "/theme.info";
+ $file = THEMEPATH . $theme_name . "/theme.info";
$theme_info = new ArrayObject(parse_ini_file($file), ArrayObject::ARRAY_AS_PROPS);
print theme::get_edit_form_admin($theme_info);
}
-
+
public function save() {
access::verify_csrf();
$theme = $this->input->post("themes");