diff options
author | rub <rub@piwigo.org> | 2007-02-23 23:50:26 +0000 |
---|---|---|
committer | rub <rub@piwigo.org> | 2007-02-23 23:50:26 +0000 |
commit | 027db797b2853e682c36793d35a2987c9e1cbc0a (patch) | |
tree | 92ba455428bc6dfdd21d5c5ef55cad8bcc7850aa /include | |
parent | f800d4fb40468fbf255ac78ccd2da82544f8d557 (diff) |
Fix bug on my revision 1851.
git-svn-id: http://piwigo.org/svn/trunk@1854 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include')
-rw-r--r-- | include/functions_category.inc.php | 3 | ||||
-rw-r--r-- | include/functions_user.inc.php | 34 |
2 files changed, 18 insertions, 19 deletions
diff --git a/include/functions_category.inc.php b/include/functions_category.inc.php index 040d91d9e..8ed10de3e 100644 --- a/include/functions_category.inc.php +++ b/include/functions_category.inc.php @@ -2,9 +2,8 @@ // +-----------------------------------------------------------------------+ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | -// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | +// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ -// | branch : BSF (Best So Far) // | file : $Id$ // | last update : $Date$ // | last modifier : $Author$ diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 6b0b110c8..8be4f03cb 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -2,9 +2,8 @@ // +-----------------------------------------------------------------------+ // | PhpWebGallery - a PHP based picture gallery | // | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net | -// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net | +// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | // +-----------------------------------------------------------------------+ -// | branch : BSF (Best So Far) // | file : $Id$ // | last update : $Date$ // | last modifier : $Author$ @@ -983,28 +982,25 @@ function get_access_type_status($user_status='') { global $user, $conf; - if ($user_status == '' and isset($user['status']) ) + if (empty($user_status)) { - $user_status = $user['status']; + if (isset($user['status'])) + { + $user_status = $user['status']; + } + else + { + // swicth to default value + $user_status = ''; + } } - $access_type_status = ACCESS_NONE; switch ($user_status) { case 'guest': { - if - ( - !isset($user) or - ($user['id']==$conf['guest_id'] and !$conf['guest_access']) - ) - { - $access_type_status = ACCESS_NONE; - } - else - { - $access_type_status = ACCESS_GUEST; - } + $access_type_status = + ($conf['guest_access'] ? ACCESS_GUEST : ACCESS_NONE); break; } case 'generic': @@ -1027,6 +1023,10 @@ function get_access_type_status($user_status='') $access_type_status = ACCESS_WEBMASTER; break; } + case 'default': + { + $access_type_status = ACCESS_NONE; + } } return $access_type_status; |