Index: branches/5.2.x/core/units/favorites/favorites_config.php =================================================================== diff -u -N -r15012 -r16388 --- branches/5.2.x/core/units/favorites/favorites_config.php (.../favorites_config.php) (revision 15012) +++ branches/5.2.x/core/units/favorites/favorites_config.php (.../favorites_config.php) (revision 16388) @@ -1,6 +1,6 @@ 'fav', - 'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'FavoritesEventHandler', 'file' => 'favorites_eh.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), +$config = Array ( + 'Prefix' => 'fav', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'FavoritesEventHandler', 'file' => 'favorites_eh.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, + 'AutoLoad' => true, - 'Hooks' => Array ( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => '#PARENT#', - 'HookToSpecial' => '-item', // from OnMassDelete event - 'HookToEvent' => Array('OnAfterItemDelete'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnDeleteFavoriteItem', - ), + 'Hooks' => Array ( + Array ( + 'Mode' => hAFTER, + 'Conditional' => false, + 'HookToPrefix' => '#PARENT#', + 'HookToSpecial' => '-item', // from OnMassDelete event + 'HookToEvent' => Array ('OnAfterItemDelete'), + 'DoPrefix' => '', + 'DoSpecial' => '', + 'DoEvent' => 'OnDeleteFavoriteItem', ), + ), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'IDField' => 'FavoriteId', - 'TableName' => TABLE_PREFIX.'UserFavorites', + 'IDField' => 'FavoriteId', + 'TableName' => TABLE_PREFIX.'UserFavorites', - 'ParentTableKey' => 'PortalUserId', - 'ForeignKey' => 'PortalUserId', - 'ParentPrefix' => 'u', + 'ParentTableKey' => 'PortalUserId', + 'ForeignKey' => 'PortalUserId', + 'ParentPrefix' => 'u', - 'AutoDelete' => true, - 'AutoClone' => false, + 'AutoDelete' => true, + 'AutoClone' => false, - 'ListSQLs' => Array ('' => 'SELECT * FROM %s'), - 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'), + 'ListSQLs' => Array ('' => 'SELECT * FROM %s'), - 'ListSortings' => Array ( - '' => Array( - 'Sorting' => Array('Modified' => 'desc'), - ) - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('Modified' => 'desc'), + ) + ), - 'Fields' => Array ( - 'FavoriteId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0,), - 'PortalUserId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'ItemTypeId' => Array('type' => 'int','not_null' => 1, 'default' => 0), - 'Modified' => Array('type' => 'int','not_null' => 1, 'default' => '#NOW#'), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'FavoriteId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0,), + 'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ItemTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Modified' => Array ('type' => 'int', 'not_null' => 1, 'default' => '#NOW#'), + ), +); \ No newline at end of file