From 98a9d5ee2d6a272b9f65ad8b69fa3580f3d0ab93 Mon Sep 17 00:00:00 2001 From: Steven Wittens Date: Sun, 22 Aug 2004 14:43:49 +0000 Subject: - #9576: Patch by TDobes, only allow the user to choose between enabled themes. --- modules/system.module | 11 ++++++++++- modules/system/system.module | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/system.module b/modules/system.module index 5508f868d..a2ec2f332 100644 --- a/modules/system.module +++ b/modules/system.module @@ -113,7 +113,16 @@ function system_menu() { */ function system_user($type, $edit, &$user, $category = NULL) { if ($type == 'form' && $category == 'account') { - if (count($themes = list_themes()) > 1) { + $allthemes = list_themes(); + + // list only active themes + foreach ($allthemes as $key => $theme) { + if ($theme->status) { + $themes[$key] = $theme; + } + } + + if (count($themes) > 1) { $rows = array(); foreach ($themes as $key => $value) { $row = array(); diff --git a/modules/system/system.module b/modules/system/system.module index 5508f868d..a2ec2f332 100644 --- a/modules/system/system.module +++ b/modules/system/system.module @@ -113,7 +113,16 @@ function system_menu() { */ function system_user($type, $edit, &$user, $category = NULL) { if ($type == 'form' && $category == 'account') { - if (count($themes = list_themes()) > 1) { + $allthemes = list_themes(); + + // list only active themes + foreach ($allthemes as $key => $theme) { + if ($theme->status) { + $themes[$key] = $theme; + } + } + + if (count($themes) > 1) { $rows = array(); foreach ($themes as $key => $value) { $row = array(); -- cgit v1.2.3