Index: branches/RC/core/units/general/helpers/permissions_helper.php =================================================================== diff -u -N -r11319 -r11538 --- branches/RC/core/units/general/helpers/permissions_helper.php (.../permissions_helper.php) (revision 11319) +++ branches/RC/core/units/general/helpers/permissions_helper.php (.../permissions_helper.php) (revision 11538) @@ -299,7 +299,7 @@ $perm_event = getArrayValue($params, 'perm_event'); $permission_groups = getArrayValue($params, 'permissions'); - if ($permission_groups) { + if ($permission_groups && !$perm_event) { // check permissions by permission names in current category $permission_groups = explode('|', $permission_groups); $group_has_permission = false; @@ -329,7 +329,7 @@ } elseif ($perm_event) { // check permission by event name - list($prefix, $event) = explode(':', $perm_event); + list ($prefix, $event) = explode(':', $perm_event); $event_handler =& $this->Application->recallObject($prefix.'_EventHandler'); return $event_handler->CheckPermission( new kEvent($perm_event) ); } @@ -503,6 +503,10 @@ FROM '.$this->Application->getUnitOption('c', 'TableName').' WHERE CategoryId = '.$cat_id; $cat_hierarchy = $this->Conn->GetOne($sql); + if ($cat_hierarchy === false) { + // category was deleted, but refrence to it stays in other tables -> data integrity is broken + $cat_hierarchy = '|' . $this->Application->findModule('Name', 'Proj-CMS', 'RootCat') . '|'; + } } $cat_hierarchy = explode('|', substr($cat_hierarchy, 1, -1));