Skip to content

Commit 9b053d5

Browse files
committed
Fix rights matrix display for object; fixes #182
1 parent 43c6936 commit 9b053d5

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

inc/profile.class.php

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,22 @@ static function showForItemtype($type) {
7676
echo "</strong></th></tr>";
7777

7878
echo "<tr><td class='genericobject_type_profiles'>";
79-
$rights = [];
8079
foreach (getAllDatasFromTable(getTableForItemtype("Profile")) as $profile) {
8180
$prof = new Profile();
8281
$prof->getFromDB($profile['id']);
83-
$right = self::getProfileforItemtype($profile['id'], $itemtype);
84-
$label = $profile['name'];
85-
$rights[] = [
86-
'label' => $label,
87-
'itemtype' => $itemtype,
88-
'field' => self::getProfileNameForItemtype($itemtype),
89-
'html_field' => "profile_" . $profile['id'],
82+
$rights = [
83+
[
84+
'label' => $profile['name'],
85+
'itemtype' => $itemtype,
86+
'field' => self::getProfileNameForItemtype($itemtype),
87+
'html_field' => "profile_" . $profile['id'],
88+
]
9089
];
90+
$prof->displayRightsChoiceMatrix(
91+
$rights
92+
);
9193
}
9294

93-
$prof->displayRightsChoiceMatrix(
94-
$rights
95-
);
9695
echo "</td></tr>";
9796
echo "<input type='hidden' name='itemtype' value='".$itemtype."'>";
9897

0 commit comments

Comments
 (0)