mirror of
https://github.com/e107inc/e107.git
synced 2025-07-28 10:20:45 +02:00
Update check_class to take better account of E_UC_PUBLIC
This commit is contained in:
@@ -11,8 +11,8 @@
|
||||
| GNU General Public License (http://gnu.org).
|
||||
|
|
||||
| $Source: /cvs_backup/e107_0.8/class2.php,v $
|
||||
| $Revision: 1.39 $
|
||||
| $Date: 2008-01-05 22:02:31 $
|
||||
| $Revision: 1.40 $
|
||||
| $Date: 2008-01-06 17:57:06 $
|
||||
| $Author: e107steved $
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
@@ -973,7 +973,7 @@ function check_class($var, $userclass = USERCLASS_LIST, $uid = 0)
|
||||
$v = $row['userclass_id'];
|
||||
}
|
||||
}
|
||||
if(in_array($v, $class_array))
|
||||
if (in_array($v, $class_array) || (ctype_digit($v) && ($v == 0)))
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
@@ -42,7 +42,7 @@ else
|
||||
{
|
||||
if(strstr($postID,'class:'))
|
||||
{
|
||||
$uc = substr($postID,6).','.e_UC_PUBLIC; // Not ideal, but 'Everyone' class not necessarily present
|
||||
$uc = substr($postID,6);
|
||||
$can_show = check_class($pref['image_post_class'],$uc);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user