diff options
author | mistic100 <mistic@piwigo.org> | 2014-07-07 11:16:48 +0000 |
---|---|---|
committer | mistic100 <mistic@piwigo.org> | 2014-07-07 11:16:48 +0000 |
commit | f2c16c2b339eb9cb66c4857fc13c670d26e320bf (patch) | |
tree | 610a8b8952d0801c144159785ecea53cb016bd1e /admin/themes_installed.php | |
parent | be610d6a1b2bc4ad287d2bdaab44cc2e566fdd85 (diff) |
bug 3075: Prevent deactivate default theme
git-svn-id: http://piwigo.org/svn/trunk@28989 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/themes_installed.php')
-rw-r--r-- | admin/themes_installed.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/admin/themes_installed.php b/admin/themes_installed.php index 711ddee52..eb16dc144 100644 --- a/admin/themes_installed.php +++ b/admin/themes_installed.php @@ -91,6 +91,7 @@ foreach ($themes->fs_themes as $theme_id => $fs_theme) if (in_array($theme_id, $db_theme_ids)) { $tpl_theme['STATE'] = 'active'; + $tpl_theme['IS_DEFAULT'] = ($theme_id == $default_theme); $tpl_theme['DEACTIVABLE'] = true; if (count($db_theme_ids) <= 1) @@ -98,8 +99,11 @@ foreach ($themes->fs_themes as $theme_id => $fs_theme) $tpl_theme['DEACTIVABLE'] = false; $tpl_theme['DEACTIVATE_TOOLTIP'] = l10n('Impossible to deactivate this theme, you need at least one theme.'); } - - $tpl_theme['IS_DEFAULT'] = ($theme_id == $default_theme); + if ($tpl_theme['IS_DEFAULT']) + { + $tpl_theme['DEACTIVABLE'] = false; + $tpl_theme['DEACTIVATE_TOOLTIP'] = l10n('Impossible to deactivate the default theme.'); + } } else { |