diff options
author | rub <rub@piwigo.org> | 2007-06-21 21:00:09 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-06-21 21:00:09 +0000 |
commit | 97703aa9deebdb6d7e9c3bed2917e78dd39d7be0 (patch) | |
tree | c4da134869c46b7e18205585a155ed8c83f73b4f /include/functions_user.inc.php | |
parent | 58dc3aa595dd7630836646e7d52220a973d43e93 (diff) |
Resolved issue 0000708: Error on synchronization
Resolved issue 0000709: Error with $conf['default_admin_layout']
Merge BSF 2037:2039 into branch-1_7
git-svn-id: http://piwigo.org/svn/branches/branch-1_7@2040 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_user.inc.php')
-rw-r--r-- | include/functions_user.inc.php | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 5ed6c169f..564b4b2c7 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -144,6 +144,7 @@ function setup_style($style) function build_user( $user_id, $use_cache ) { global $conf; + $user['id'] = $user_id; $user = array_merge( $user, getuserdata($user_id, $use_cache) ); $user['is_the_guest'] = ($user['id'] == $conf['guest_id']); @@ -152,23 +153,19 @@ 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']; - // include template/theme configuration - if (defined('IN_ADMIN') and IN_ADMIN) + if (is_admin($user['status'])) { - list($user['template'], $user['theme']) = + list($user['admin_template'], $user['admin_theme']) = explode ( '/', isset($conf['default_admin_layout']) ? $conf['default_admin_layout'] : $user['template'] ); - // TODO : replace $conf['admin_layout'] by $user['admin_layout'] - } - else - { - list($user['template'], $user['theme']) = explode('/', $user['template']); } + list($user['template'], $user['theme']) = explode('/', $user['template']); + return $user; } |