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:
plegall 2010-04-28 14:28:05 +00:00
commit 73db66afa5
11 changed files with 255 additions and 113 deletions

View file

@ -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;
}
}
}
/*