aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2014-07-07 11:16:48 +0000
committermistic100 <mistic@piwigo.org>2014-07-07 11:16:48 +0000
commitf2c16c2b339eb9cb66c4857fc13c670d26e320bf (patch)
tree610a8b8952d0801c144159785ecea53cb016bd1e
parentbe610d6a1b2bc4ad287d2bdaab44cc2e566fdd85 (diff)
bug 3075: Prevent deactivate default theme
git-svn-id: http://piwigo.org/svn/trunk@28989 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r--admin/themes_installed.php8
-rw-r--r--language/en_UK/admin.lang.php1
-rw-r--r--language/fr_FR/admin.lang.php1
3 files changed, 8 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
{
diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php
index ba518ee65..7e849b5d4 100644
--- a/language/en_UK/admin.lang.php
+++ b/language/en_UK/admin.lang.php
@@ -414,6 +414,7 @@ $lang['Image Quality'] = 'Image quality';
$lang['Images manual order was saved'] = "Images manual order saved";
$lang['Impossible automatic correction'] = "Automatic correction impossible";
$lang['Impossible to activate this theme, the parent theme is missing: %s'] = 'This theme could not be activated, as the parent theme is missing: %s';
+$lang['Impossible to deactivate the default theme.'] = 'Impossible to deactivate the default theme.';
$lang['Impossible to deactivate this language, first set another language as default.'] = 'Impossible to deactivate this language, first set another language as default.';
$lang['Impossible to deactivate this language, you need at least one language.'] = 'Impossible to deactivate this language, you need at least one language.';
$lang['Impossible to deactivate this theme, you need at least one theme.'] = 'Impossible to deactivate this theme, you need at least one theme.';
diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php
index 3ffdb17ae..a1383fe3c 100644
--- a/language/fr_FR/admin.lang.php
+++ b/language/fr_FR/admin.lang.php
@@ -975,4 +975,5 @@ $lang['Close user details'] = 'Fermer les détails de l\'utilisateur';
$lang['close'] = 'fermer';
$lang['Activate it now'] = 'Activate it now';
$lang['Allow users to add a link to their website'] = 'Autoriser les utilisateurs à donner un lien vers leur site web';
+$lang['Impossible to deactivate the default theme.'] = 'Impossible de désactiver le thème par défaut.';
?> \ No newline at end of file