mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 01:03:31 +02:00
bug 3075: Prevent deactivate default theme
git-svn-id: http://piwigo.org/svn/trunk@28989 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user