Index: branches/5.3.x/core/units/permissions/permissions_config.php =================================================================== diff -u -N -r15483 -r15659 --- branches/5.3.x/core/units/permissions/permissions_config.php (.../permissions_config.php) (revision 15483) +++ branches/5.3.x/core/units/permissions/permissions_config.php (.../permissions_config.php) (revision 15659) @@ -1,6 +1,6 @@ 'perm', - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'PermissionsEventHandler','file'=>'permissions_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'PermissionsTagProcessor','file'=>'permissions_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'perm', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'PermissionsEventHandler', 'file' => 'permissions_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'PermissionsTagProcessor', 'file' => 'permissions_tag_processor.php', 'build_event' => 'OnBuild'), - 'Clones' => Array( - 'c-perm' => Array( - 'Constrain' => 'Type = 0', // non-system - 'ParentPrefix' => 'c', - 'ForeignKey' => 'CatId', - 'ParentTableKey' => 'CategoryId', + 'AutoLoad' => true, - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => true, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnPreSave'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnCategorySavePermissions', - ), - ), - ), + 'Clones' => Array ( + 'c-perm' => Array ( + 'Constrain' => 'Type = 0', // non-system + 'ParentPrefix' => 'c', + 'ForeignKey' => 'CatId', + 'ParentTableKey' => 'CategoryId', - 'g-perm' => Array( - 'Constrain' => 'Type = 1', // system - 'ParentPrefix' => 'g', - 'ForeignKey' => 'GroupId', - 'ParentTableKey' => 'GroupId', + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => true, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnPreSave'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnCategorySavePermissions', + ), + ), + ), - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => true, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnPreSave'), - 'DoPrefix' => '', - 'DoSpecial' => '*', - 'DoEvent' => 'OnGroupSavePermissions', - ), - ), - ), - ), + 'g-perm' => Array ( + 'Constrain' => 'Type = 1', // system + 'ParentPrefix' => 'g', + 'ForeignKey' => 'GroupId', + 'ParentTableKey' => 'GroupId', - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => true, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '*', + 'HookToEvent' => Array ('OnPreSave'), + 'DoPrefix' => '', + 'DoSpecial' => '*', + 'DoEvent' => 'OnGroupSavePermissions', + ), + ), + ), + ), - 'IDField' => 'PermissionId', + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'StatusField' => Array('PermissionValue'), + 'IDField' => 'PermissionId', - 'TitleField' => 'Permission', + 'StatusField' => Array ('PermissionValue'), - 'TableName' => TABLE_PREFIX.'Permissions', + 'TitleField' => 'Permission', - 'AutoDelete' => false, - 'AutoClone' => false, + 'TableName' => TABLE_PREFIX.'Permissions', - 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), - 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), + 'AutoDelete' => false, + 'AutoClone' => false, - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('Permission' => 'asc'), - ) - ), - 'Fields' => Array( - 'PermissionId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Permission' => Array('type' => 'string','not_null' => '1','default' => ''), - 'GroupId' => Array('type' => 'int','default' => 0), - 'PermissionValue' => Array('type' => 'int','not_null' => 1,'default' => 0), - 'Type' => Array('type' => 'int','not_null' => 1,'default' => 0), - 'CatId' => Array('type' => 'int','not_null' => 1,'default' => 0), - ), - ); \ No newline at end of file + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s' + ), + + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Permission' => 'asc'), + ) + ), + 'Fields' => Array ( + 'PermissionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Permission' => Array ('type' => 'string', 'not_null' => '1', 'default' => ''), + 'GroupId' => Array ('type' => 'int', 'default' => 0), + 'PermissionValue' => Array ('type' => 'int', 'not_null' => 1,'default' => 0), + 'Type' => Array ('type' => 'int', 'not_null' => 1,'default' => 0), + 'CatId' => Array ('type' => 'int', 'not_null' => 1,'default' => 0), + ), +); \ No newline at end of file