aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_user.inc.php
diff options
context:
space:
mode:
authorplegall <plg@piwigo.org>2010-03-13 00:00:52 +0000
committerplegall <plg@piwigo.org>2010-03-13 00:00:52 +0000
commit14778ce673277f2df41f963aa70df1cbed427294 (patch)
tree8c723d4d9827876dbf19d2bd581405fc50910860 /include/functions_user.inc.php
parentc396f08708d431c6f7e8656eaca4fd8e440fdd39 (diff)
feature 1502: based on Dotclear model, P@t has reorganized the way Piwigo
manages template/theme in a simpler "theme only level" architecture. It supports multiple level inheritance. git-svn-id: http://piwigo.org/svn/trunk@5123 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_user.inc.php')
-rw-r--r--include/functions_user.inc.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php
index 3a4d17549..f3eb0b172 100644
--- a/include/functions_user.inc.php
+++ b/include/functions_user.inc.php
@@ -245,7 +245,11 @@ function build_user( $user_id, $use_cache )
// calculation of the number of picture to display per page
$user['nb_image_page'] = $user['nb_image_line'] * $user['nb_line_page'];
- list($user['template'], $user['theme']) = explode('/', $user['template']);
+ // Check user theme
+ if (!file_exists(PHPWG_ROOT_PATH.'themes/'.$user['theme'].'/themeconf.inc.php'))
+ {
+ $user['theme'] = $conf['default_theme'];
+ }
return $user;
}
@@ -841,9 +845,9 @@ function get_default_user_value($value_name, $sos_value)
* Returns the default template value
*
*/
-function get_default_template()
+function get_default_theme()
{
- return get_default_user_value('template', PHPWG_DEFAULT_TEMPLATE);
+ return get_default_user_value('theme', PHPWG_DEFAULT_TEMPLATE);
}
/*