mirror of
https://github.com/Mibew/mibew.git
synced 2025-05-07 21:13:07 +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.
|
// Get IDs of groups the operator belongs to.
|
||||||
$checked_groups = array();
|
$checked_groups = array();
|
||||||
if ($op) {
|
if ($op) {
|
||||||
foreach (get_operator_group_ids($op_id) as $rel) {
|
$checked_groups = get_operator_group_ids($op_id);
|
||||||
$checked_groups[] = $rel['groupid'];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get all available groups
|
// Get all available groups
|
||||||
|
@ -635,13 +635,18 @@ function get_sorted_groups($order)
|
|||||||
|
|
||||||
function get_operator_group_ids($operator_id)
|
function get_operator_group_ids($operator_id)
|
||||||
{
|
{
|
||||||
$db = Database::getInstance();
|
$rows = Database::getInstance()->query(
|
||||||
|
|
||||||
return $db->query(
|
|
||||||
"SELECT groupid FROM {operatortoopgroup} WHERE operatorid = ?",
|
"SELECT groupid FROM {operatortoopgroup} WHERE operatorid = ?",
|
||||||
array($operator_id),
|
array($operator_id),
|
||||||
array('return_rows' => Database::RETURN_ALL_ROWS)
|
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)
|
function get_operators_from_adjacent_groups($operator)
|
||||||
|
Loading…
Reference in New Issue
Block a user