diff options
author | plegall <plg@piwigo.org> | 2010-04-15 22:08:37 +0000 |
---|---|---|
committer | plegall <plg@piwigo.org> | 2010-04-15 22:08:37 +0000 |
commit | 9ee08fcf12cf1ad4fc265383c39b86e43d5611e9 (patch) | |
tree | 861ec4c5323ab3e55a9b0bf7c12a995710768d12 | |
parent | 228625959d51d5c70164b0f1d243d06aaa05a8ae (diff) |
feature 1605: ability to forbid theme activation, needed for gally-default.
git-svn-id: http://piwigo.org/svn/trunk@5874 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to '')
-rw-r--r-- | admin/include/themes.class.php | 4 | ||||
-rw-r--r-- | admin/themes_installed.php | 9 | ||||
-rw-r--r-- | language/en_UK/admin.lang.php | 2 | ||||
-rw-r--r-- | language/fr_FR/admin.lang.php | 2 |
4 files changed, 14 insertions, 3 deletions
diff --git a/admin/include/themes.class.php b/admin/include/themes.class.php index cf81fb54e..832110e8e 100644 --- a/admin/include/themes.class.php +++ b/admin/include/themes.class.php @@ -382,6 +382,10 @@ SELECT { $theme['parent'] = $val[1]; } + if (preg_match('/["\']activable["\'].*?(true|false)/', $theme_data, $val)) + { + $theme['activable'] = get_boolean($val[1]); + } // screenshot $screenshot_path = $path.'/screenshot.png'; diff --git a/admin/themes_installed.php b/admin/themes_installed.php index a4403266e..f98493737 100644 --- a/admin/themes_installed.php +++ b/admin/themes_installed.php @@ -99,7 +99,14 @@ foreach ($themes->fs_themes as $theme_id => $fs_theme) else { // is the theme "activable" ? - $fs_theme['activable'] = true; + if (isset($fs_theme['activable']) and !$fs_theme['activable']) + { + $fs_theme['activate_tooltip'] = l10n('This theme was not designed to be directly activated'); + } + else + { + $fs_theme['activable'] = true; + } $missing_parent = $themes->missing_parent_theme($theme_id); if (isset($missing_parent)) diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php index f3ebabc33..16c0556bb 100644 --- a/language/en_UK/admin.lang.php +++ b/language/en_UK/admin.lang.php @@ -764,6 +764,6 @@ $lang['There is no other language available.'] = 'There is no other language ava $lang['There is no other plugin available.'] = 'There is no other plugin available.'; $lang['There is no other theme available.'] = 'There is no other theme available.'; $lang['Add another set of photos'] = 'Add another set of photos'; - $lang['Order of menubar items has been updated successfully.'] = 'Order of menubar items has been updated successfully.'; +$lang['This theme was not designed to be directly activated'] = 'This theme was not designed to be directly activated'; ?> diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php index 8a71eb3ab..28b31c006 100644 --- a/language/fr_FR/admin.lang.php +++ b/language/fr_FR/admin.lang.php @@ -769,6 +769,6 @@ $lang['There is no other plugin available.'] = 'Il n\'y a pas d\'autre plugin di $lang['There is no other theme available.'] = 'Il n\'y a pas d\'autre thème disponible.'; $lang['delete'] = 'effacer'; $lang['Add another set of photos'] = 'Ajouter d\'autres photos'; - $lang['Order of menubar items has been updated successfully.'] = 'L\'ordre des éléments du menu a été mis à jour avec succès.'; +$lang['This theme was not designed to be directly activated'] = 'Ce thème n\'est pas conçu pour être activé directement'; ?> |