mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-08 01:32:59 +02:00
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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user