mirror of
https://github.com/Mibew/mibew.git
synced 2025-01-31 13:24:41 +03:00
Return IDs set from "get_operator_group_ids" function
This commit is contained in:
parent
146c4b7ac1
commit
38bc096444
@ -68,9 +68,7 @@ class GroupsController extends AbstractController
|
||||
// Get IDs of groups the operator belongs to.
|
||||
$checked_groups = array();
|
||||
if ($op) {
|
||||
foreach (get_operator_group_ids($op_id) as $rel) {
|
||||
$checked_groups[] = $rel['groupid'];
|
||||
}
|
||||
$checked_groups = get_operator_group_ids($op_id);
|
||||
}
|
||||
|
||||
// Get all available groups
|
||||
|
@ -635,13 +635,18 @@ function get_sorted_groups($order)
|
||||
|
||||
function get_operator_group_ids($operator_id)
|
||||
{
|
||||
$db = Database::getInstance();
|
||||
|
||||
return $db->query(
|
||||
$rows = Database::getInstance()->query(
|
||||
"SELECT groupid FROM {operatortoopgroup} WHERE operatorid = ?",
|
||||
array($operator_id),
|
||||
array('return_rows' => Database::RETURN_ALL_ROWS)
|
||||
);
|
||||
|
||||
$groups = array();
|
||||
foreach ($rows as $row) {
|
||||
$groups[] = $row['groupid'];
|
||||
}
|
||||
|
||||
return $groups;
|
||||
}
|
||||
|
||||
function get_operators_from_adjacent_groups($operator)
|
||||
|
Loading…
Reference in New Issue
Block a user