aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-04-28 14:28:05 +0000
committerplegall <plg@piwigo.org>2010-04-28 14:28:05 +0000
commit73db66afa58cb14c6ced4163c10f4603a3399428 (patch)
treee5546bda92f92c4de6c1f104a66efebd3f462df3 /include/functions_user.inc.php
parentaaa31653eee276541f693a42159c1ea40421dbfd (diff)
feature 1630: upgrade to Piwigo 2.1 :-)
bug 1604: only activate core themes not all themes. git-svn-id: http://piwigo.org/svn/trunk@5982 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_user.inc.php')
-rw-r--r--include/functions_user.inc.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 6a63c83e4..41c97d0bb 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -848,7 +848,21 @@ function get_default_user_value($value_name, $sos_value)
*/
function get_default_theme()
{
- return get_default_user_value('theme', PHPWG_DEFAULT_TEMPLATE);
+ $theme = get_default_user_value('theme', PHPWG_DEFAULT_TEMPLATE);
+ if (check_theme_installed($theme))
+ {
+ return $theme;
+ }
+
+ // let's find the first available theme
+ $active_themes = get_pwg_themes();
+ foreach (array_keys(get_pwg_themes()) as $theme_id)
+ {
+ if (check_theme_installed($theme_id))
+ {
+ return $theme_id;
+ }
+ }
}
/*