Fix bug on my revision 1851.

git-svn-id: http://piwigo.org/svn/trunk@1854 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
rub 2007-02-23 23:50:26 +00:00
parent f800d4fb40
commit 027db797b2
2 changed files with 18 additions and 19 deletions

View file

@ -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$

View file

@ -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;