aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes_installed.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-22 15:03:43 +0000
committerplegall <plg@piwigo.org>2010-03-22 15:03:43 +0000
commit363268ab990454feec7d88f148716af04d42014c (patch)
tree65c72547fb269e701edbb930baecdf30d49a99c8 /admin/themes_installed.php
parent15499d5dc13cb4680fa2a683f459bbfe785d70a5 (diff)
ture 1514: improvement, impossible to activate a theme is a parent is missing
(a parent includes grand father and his own father, and his own father, and so on... until the root theme is "default" or has no parent declared) git-svn-id: http://piwigo.org/svn/trunk@5259 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r--admin/themes_installed.php21
1 files changed, 17 insertions, 4 deletions
diff --git a/admin/themes_installed.php b/admin/themes_installed.php
index 82efe569a..dda2ab6ed 100644
--- a/admin/themes_installed.php
+++ b/admin/themes_installed.php
@@ -89,7 +89,24 @@ foreach ($themes->fs_themes as $theme_id => $fs_theme)
}
else
{
+ // is the theme "activable" ?
+ $fs_theme['activable'] = true;
+
+ $missing_parent = $themes->missing_parent_theme($theme_id);
+ if (isset($missing_parent))
+ {
+ $fs_theme['activable'] = false;
+
+ $fs_theme['activate_tooltip'] = sprintf(
+ l10n('Impossible to activate this theme, the parent theme is missing: %s'),
+ $missing_parent
+ );
+ }
+
+ // is the theme "deletable" ?
$children = $themes->get_children_themes($theme_id);
+
+ $fs_theme['deletable'] = true;
if (count($children) > 0)
{
@@ -100,10 +117,6 @@ foreach ($themes->fs_themes as $theme_id => $fs_theme)
implode(', ', $children)
);
}
- else
- {
- $fs_theme['deletable'] = true;
- }
array_push($inactive_themes, $fs_theme);
}