aboutsummaryrefslogtreecommitdiffstats
path: root/admin/themes_installed.php
diff options
context:
space:
mode:
Diffstat (limited to 'admin/themes_installed.php')
-rw-r--r--admin/themes_installed.php18
1 files changed, 17 insertions, 1 deletions
diff --git a/admin/themes_installed.php b/admin/themes_installed.php
index 68510354f..82efe569a 100644
--- a/admin/themes_installed.php
+++ b/admin/themes_installed.php
@@ -68,7 +68,7 @@ foreach ($db_themes as $db_theme)
$active_themes = array();
$inactive_themes = array();
-foreach($themes->fs_themes as $theme_id => $fs_theme)
+foreach ($themes->fs_themes as $theme_id => $fs_theme)
{
if ($theme_id == 'default')
{
@@ -89,6 +89,22 @@ foreach($themes->fs_themes as $theme_id => $fs_theme)
}
else
{
+ $children = $themes->get_children_themes($theme_id);
+
+ if (count($children) > 0)
+ {
+ $fs_theme['deletable'] = false;
+
+ $fs_theme['delete_tooltip'] = sprintf(
+ l10n('Impossible to delete this theme. Other themes depends on it: %s'),
+ implode(', ', $children)
+ );
+ }
+ else
+ {
+ $fs_theme['deletable'] = true;
+ }
+
array_push($inactive_themes, $fs_theme);
}
}