Index: branches/RC/core/units/permissions/permissions_event_handler.php =================================================================== diff -u -r8929 -r9363 --- branches/RC/core/units/permissions/permissions_event_handler.php (.../permissions_event_handler.php) (revision 8929) +++ branches/RC/core/units/permissions/permissions_event_handler.php (.../permissions_event_handler.php) (revision 9363) @@ -31,7 +31,7 @@ $object =& $event->getObject( Array('skip_autoload' => true) ); $permissions_helper =& $this->Application->recallObject('PermissionsHelper'); /* @var $permissions_helper kPermissionsHelper */ - + $permissions_helper->LoadPermissions($group_id, $category_id, 0, 'c'); // format: ['inherited'] || ['value'] @@ -99,7 +99,7 @@ $group_id = $this->Application->GetVar('g_id'); $permissions_helper =& $this->Application->recallObject('PermissionsHelper'); /* @var $permissions_helper kPermissionsHelper */ - + $permissions_helper->LoadPermissions($group_id, 0, 1, 'g'); $delete_ids = Array(); @@ -113,12 +113,12 @@ $sections_helper =& $this->Application->recallObject('SectionsHelper'); foreach ($permissions as $section_name => $section_permissions) { $section_data =& $sections_helper->getSectionData($section_name); - + if ($section_data && isset($section_data['perm_prefix'])) { // using permission from other prefix $section_name = $this->Application->getUnitOption($section_data['perm_prefix'].'.main', 'PermSection'); } - + foreach ($section_permissions as $perm_name => $perm_value) { if (!$permissions_helper->isOldPermission($section_name, $perm_name)) { @@ -132,7 +132,7 @@ } elseif ($db_perm_value == 0 && $perm_value == 1) { // permission was enabled => created it's record - $create_sql[] = sprintf($create_mask, $new_id--, $this->Conn->qstr($perm_name), $this->Conn->qstr($perm_value)); + $create_sql[$perm_name] = sprintf($create_mask, $new_id--, $this->Conn->qstr($perm_name), $this->Conn->qstr($perm_value)); } // permission state was not changed in all other cases }