diff options
author | Udo Walter | 2017-11-21 18:16:26 +0100 |
---|---|---|
committer | Udo Walter | 2017-11-21 18:16:26 +0100 |
commit | 3e8e5801fa88768bf0957f64b911d822ac28fead (patch) | |
tree | 707ebbd89cfbd74babd2939beea58b715ce070de /modules-available/permissionmanager/inc/getpermissiondata.inc.php | |
parent | Merge remote-tracking branch 'origin/master' into permission-manager (diff) | |
download | slx-admin-3e8e5801fa88768bf0957f64b911d822ac28fead.tar.gz slx-admin-3e8e5801fa88768bf0957f64b911d822ac28fead.tar.xz slx-admin-3e8e5801fa88768bf0957f64b911d822ac28fead.zip |
[permissionmanager] fixed bug: role without locations was shown as role with all locations;
Diffstat (limited to 'modules-available/permissionmanager/inc/getpermissiondata.inc.php')
-rw-r--r-- | modules-available/permissionmanager/inc/getpermissiondata.inc.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/modules-available/permissionmanager/inc/getpermissiondata.inc.php b/modules-available/permissionmanager/inc/getpermissiondata.inc.php index 9d69c722..13c7ca89 100644 --- a/modules-available/permissionmanager/inc/getpermissiondata.inc.php +++ b/modules-available/permissionmanager/inc/getpermissiondata.inc.php @@ -26,9 +26,8 @@ class GetPermissionData { // get LocationIDs, Location Names, Roles of each Location public static function getLocationData() { - $res = Database::simpleQuery("SELECT role.roleid as roleid, rolename, GROUP_CONCAT(locationid) as locationids FROM role - LEFT JOIN (SELECT roleid, COALESCE(locationid, 0) AS locationid FROM role_x_location) rxl - ON role.roleid = rxl.roleid GROUP BY roleid ORDER BY rolename ASC"); + $res = Database::simpleQuery("SELECT role.roleid as roleid, rolename, GROUP_CONCAT(COALESCE(locationid, 0)) AS locationids FROM role + INNER JOIN role_x_location ON role.roleid = role_x_location.roleid GROUP BY roleid ORDER BY rolename ASC"); $locations = Location::getLocations(0, 0, false, true); while ($row = $res->fetch(PDO::FETCH_ASSOC)) { $locationids = explode(",", $row['locationids']); |