aboutsummaryrefslogtreecommitdiffstats
path: root/admin/include/functions_install.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-25 10:08:33 +0000
committerplegall <plg@piwigo.org>2010-03-25 10:08:33 +0000
commit663be9ca638c12d889036d5143fd6553f2575373 (patch)
tree70bd6feee556b5fc4a79998972caec8b791c1518 /admin/include/functions_install.inc.php
parentd19e8ef8593bfb543f5f4a32fb8b1e1d2f1c1bd9 (diff)
improvement: dynamically activate all installed themes (with checks on
parent availability and so on). git-svn-id: http://piwigo.org/svn/trunk@5340 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'admin/include/functions_install.inc.php')
-rw-r--r--admin/include/functions_install.inc.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/admin/include/functions_install.inc.php b/admin/include/functions_install.inc.php
index 7d8ae41e7..8d00a4d36 100644
--- a/admin/include/functions_install.inc.php
+++ b/admin/include/functions_install.inc.php
@@ -123,4 +123,19 @@ function available_engines()
return $engines;
}
+
+/**
+ * Automatically activate all themes in the "themes" directory.
+ *
+ * @return void
+ */
+function activate_all_themes()
+{
+ include_once(PHPWG_ROOT_PATH.'admin/include/themes.class.php');
+ $themes = new themes();
+ foreach ($themes->fs_themes as $theme_id => $fs_theme)
+ {
+ $themes->perform_action('activate', $theme_id);
+ }
+}
?> \ No newline at end of file