1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-13 10:04:35 +02:00

Fix for getUsersInClass() query. Chart class experiment (commented out)

This commit is contained in:
Cameron
2019-05-01 17:08:33 -07:00
parent 65f1a46fcf
commit 95b336dea3
3 changed files with 91 additions and 3 deletions

View File

@@ -268,11 +268,13 @@ class user_class
$blockers = array(e_UC_PUBLIC => 1, e_UC_READONLY => 1, e_UC_MEMBER => 1, e_UC_NOBODY => 1, e_UC_GUEST => 1, e_UC_NEWUSER => 1, e_UC_BOTS => 1);
$possibles = array_flip(explode(',',$classList));
unset($possibles[e_UC_READONLY]);
foreach ($this->class_tree as $uc => $uv)
{
if (!isset($blockers[$uc]))
{
$ec = $uv['userclass_editclass'];
// $ec = $uv['userclass_visibility'];
if (isset($possibles[$ec]))
{
$ret[] = $uc;
@@ -1189,7 +1191,7 @@ class user_class
{
$class_regex = implode('|', array_flip($classList));
$regex = "(^|,)(".e107::getParser()->toDB($class_regex).")(,|$)";
$qry[] = "user_class REGEXP '{$regex}' ORDER BY '{$orderBy}'";
$qry[] = "user_class REGEXP '{$regex}' ";
}
if(empty($qry))