aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes_installed.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-26 14:16:54 +0000
committerplegall <plg@piwigo.org>2010-03-26 14:16:54 +0000
commitb8a9773caf30db55f52e9562166054b0917dc990 (patch)
treed1967565dab6d621f066923dea03135eed9a0c86 /admin/themes_installed.php
parent6d006303328909b111a9db1ac4199f0a993adb8b (diff)
feature 1514: make the "deactivate" action inactive if there is no active
theme left. bug fixed: when setting the default theme, make sure at least one user will be updated. git-svn-id: http://piwigo.org/svn/trunk@5382 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/themes_installed.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/admin/themes_installed.php b/admin/themes_installed.php
index dda2ab6ed..7ef26ead7 100644
--- a/admin/themes_installed.php
+++ b/admin/themes_installed.php
@@ -77,6 +77,14 @@ foreach ($themes->fs_themes as $theme_id => $fs_theme)
if (in_array($theme_id, $db_theme_ids))
{
+ $fs_theme['deactivable'] = true;
+
+ if (count($db_theme_ids) <= 1)
+ {
+ $fs_theme['deactivable'] = false;
+ $fs_theme['deactivate_tooltip'] = l10n('Impossible to deactivate this theme, you need at least one theme.');
+ }
+
if ($theme_id == $default_theme)
{
$fs_theme['is_default'] = true;