Commit 0a9c27bfba0fd9101e8ed570a39e737bde81ffe4
1 parent
70056611
fix for KTS-575 - groups->getUsers failed to prune errors.
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@5049 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
2 changed files
with
4 additions
and
14 deletions
lib/groups/Group.inc
| ... | ... | @@ -133,19 +133,9 @@ class Group extends KTEntity { |
| 133 | 133 | /** |
| 134 | 134 | * Returns an array of Users in this group. |
| 135 | 135 | */ |
| 136 | - function getUsers() { | |
| 137 | - global $default; | |
| 138 | - $sql = $default->db; | |
| 139 | - $result = $sql->query(array("SELECT user_id FROM $default->users_groups_table WHERE group_id = ?", $this->iId));/*ok*/ | |
| 140 | - $aUsers = array(); | |
| 141 | - if ($result) { | |
| 142 | - $iCount = 0; | |
| 143 | - while ($sql->next_record()) { | |
| 144 | - $oUser = & User::get($sql->f("user_id")); | |
| 145 | - $aUsers[$iCount++] = $oUser; | |
| 146 | - } | |
| 147 | - } | |
| 148 | - return $aUsers; | |
| 136 | + function &getUsers() { | |
| 137 | + // legacy api. | |
| 138 | + return $this->getMembers(); | |
| 149 | 139 | } |
| 150 | 140 | |
| 151 | 141 | function &getMembers() { | ... | ... |
lib/workflow/workflowutil.inc.php
| ... | ... | @@ -601,7 +601,7 @@ class KTWorkflowUtil { |
| 601 | 601 | |
| 602 | 602 | // now, merge this (again) into the user-set. |
| 603 | 603 | foreach ($aGroups as $oGroup) { |
| 604 | - $aNewUsers = $oGroup->getUsers(); | |
| 604 | + $aNewUsers = $oGroup->getMembers(); | |
| 605 | 605 | foreach ($aNewUsers as $oU) { |
| 606 | 606 | $id = $oU->getId(); |
| 607 | 607 | if (!array_key_exists($id, $aUsers)) { | ... | ... |