|
From: Ulf E. <ulf...@us...> - 2005-08-22 19:58:33
|
Update of /cvsroot/phpbt/phpbt/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10527/inc Modified Files: functions.php Log Message: Removed the hardcoded "assignable" bit from TBL_AUTH_GROUP and instead added a new entry in TBL_AUTH_PERM named "Assignable". Index: functions.php =================================================================== RCS file: /cvsroot/phpbt/phpbt/inc/functions.php,v retrieving revision 1.55 retrieving revision 1.56 diff -u -r1.55 -r1.56 --- functions.php 22 Aug 2005 19:44:46 -0000 1.55 +++ functions.php 22 Aug 2005 19:58:25 -0000 1.56 @@ -161,7 +161,7 @@ break; case 'owner': // Added the DISTINCT SQL modifier so we don't get duplicated users in the list. (Because of being in multiple groups with assignable rights.) - $rs = $db->query("select DISTINCT u.user_id, login from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug, ".TBL_AUTH_GROUP." g where u.active > 0 and u.user_id = ug.user_id and ug.group_id = g.group_id and g.assignable > 0 order by login"); + $rs = $db->query("select DISTINCT u.user_id, login from ".TBL_AUTH_USER." u, ".TBL_USER_GROUP." ug, ".TBL_GROUP_PERM." gp, ".TBL_AUTH_PERM." p where u.active > 0 and u.user_id = ug.user_id and ug.group_id = gp.group_id and gp.perm_id = p.perm_id and p.perm_name = 'Assignable' order by login"); while ($rs->fetchInto($row)) { // either singular matches, or array matches are acceptable if (($selected == $row['user_id']) || (is_array($selected) && in_array($row['user_id'], $selected))) { |