Changeset 1854


Ignore:
Timestamp:
Feb 24, 2007, 12:50:26 AM (17 years ago)
Author:
rub
Message:

Fix bug on my revision 1851.

Location:
trunk/include
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/functions_category.inc.php

    r1851 r1854  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    7 // | branch        : BSF (Best So Far)
    87// | file          : $Id$
    98// | last update   : $Date$
  • trunk/include/functions_user.inc.php

    r1851 r1854  
    33// | PhpWebGallery - a PHP based picture gallery                           |
    44// | Copyright (C) 2002-2003 Pierrick LE GALL - pierrick@phpwebgallery.net |
    5 // | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
     5// | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net |
    66// +-----------------------------------------------------------------------+
    7 // | branch        : BSF (Best So Far)
    87// | file          : $Id$
    98// | last update   : $Date$
     
    984983  global $user, $conf;
    985984
    986   if ($user_status == '' and isset($user['status']) )
    987   {
    988     $user_status = $user['status'];
    989   }
    990 
    991   $access_type_status = ACCESS_NONE;
     985  if (empty($user_status))
     986  {
     987    if (isset($user['status']))
     988    {
     989      $user_status = $user['status'];
     990    }
     991    else
     992    {
     993      // swicth to default value
     994      $user_status = '';
     995    }
     996  }
     997
    992998  switch ($user_status)
    993999  {
    9941000    case 'guest':
    9951001    {
    996       if
    997         (
    998           !isset($user) or
    999           ($user['id']==$conf['guest_id'] and !$conf['guest_access'])
    1000         )
    1001       {
    1002         $access_type_status = ACCESS_NONE;
    1003       }
    1004       else
    1005       {
    1006         $access_type_status = ACCESS_GUEST;
    1007       }
     1002      $access_type_status =
     1003        ($conf['guest_access'] ? ACCESS_GUEST : ACCESS_NONE);
    10081004      break;
    10091005    }
     
    10271023      $access_type_status = ACCESS_WEBMASTER;
    10281024      break;
     1025    }
     1026    case 'default':
     1027    {
     1028      $access_type_status = ACCESS_NONE;
    10291029    }
    10301030  }
Note: See TracChangeset for help on using the changeset viewer.