Index: trunk/core/units/custom_data/custom_data_config.php =================================================================== diff -u -r7855 -r8397 --- trunk/core/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 7855) +++ trunk/core/units/custom_data/custom_data_config.php (.../custom_data_config.php) (revision 8397) @@ -1,83 +1,37 @@ 'cdata', + $config = Array ( + 'Prefix' => 'cdata', - 'Clones' => Array( - 'u-cdata' => Array( - 'TableName' => TABLE_PREFIX.'PortalUserCustomData', - 'ParentPrefix' => 'u', - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'event', + ), - 'c-cdata' => Array( - 'TableName' => TABLE_PREFIX.'CategoryCustomData', - 'ParentPrefix' => 'c', - ), + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array('class' => 'CustomDataEventHandler', 'file' => 'custom_data_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'l-cdata' => Array( - 'TableName' => TABLE_PREFIX.'LinkCustomData', - 'ParentPrefix' => 'l', - ), + 'IDField' => 'CustomDataId', - 'n-cdata' => Array( - 'TableName' => TABLE_PREFIX.'NewsCustomData', - 'ParentPrefix' => 'n', - ), + 'ParentTableKey' => 'ResourceId', + 'ForeignKey' => 'ResourceId', + 'AutoDelete' => true, + 'AutoClone' => false, - 'bb-cdata' => Array( - 'TableName' => TABLE_PREFIX.'TopicCustomData', - 'ParentPrefix' => 'bb', - ), + 'CalculatedFields' => Array ( + '' => Array(), + ), - 'p-cdata' => Array( - 'TableName' => TABLE_PREFIX.'ProductsCustomData', - 'ParentPrefix' => 'p', - ), - ), + 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), + 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), - 'QueryString' => Array( - 1 => 'id', - 2 => 'event', - ), + 'Fields' => Array ( + 'CustomDataId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), + ), + ); - 'ItemClass' => Array('class' => 'kDBItem', 'file' => '','build_event' => 'OnItemBuild'), - 'ListClass' => Array('class' => 'kDBList', 'file' => '','build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - - 'Hooks' => Array( - Array( - 'Mode' => hAFTER, - 'Conditional' => false, - 'HookToPrefix' => '#PARENT#', //self - 'HookToSpecial' => '*', - 'HookToEvent' => Array('OnAfterConfigRead'), - 'DoPrefix' => '', - 'DoSpecial' => '', - 'DoEvent' => 'OnCreateCustomFields', - ), - ), - - 'IDField' => 'CustomDataId', - - 'ParentTableKey' => 'ResourceId', - 'ForeignKey' => 'ResourceId', - 'AutoDelete' => true, - 'AutoClone' => false, - - 'CalculatedFields' => Array( - '' => Array(), - ), - - 'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), - 'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'), - - 'Fields' => Array( - 'CustomDataId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - ), - ); - - ?> \ No newline at end of file