Index: branches/5.3.x/core/units/category_items/category_items_config.php =================================================================== diff -u -N -r15483 -r15659 --- branches/5.3.x/core/units/category_items/category_items_config.php (.../category_items_config.php) (revision 15483) +++ branches/5.3.x/core/units/category_items/category_items_config.php (.../category_items_config.php) (revision 15659) @@ -1,6 +1,6 @@ 'ci', - 'ItemClass' => Array('class'=>'CategoryItems_DBItem','file'=>'category_items_dbitem.php','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'CategoryItemsEventHander','file'=>'category_items_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'CategoryItemsTagProcessor','file'=>'category_items_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, +$config = Array ( + 'Prefix' => 'ci', + 'ItemClass' => Array ('class' => 'CategoryItems_DBItem', 'file' => 'category_items_dbitem.php', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'CategoryItemsEventHander', 'file' => 'category_items_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'CategoryItemsTagProcessor', 'file' => 'category_items_tag_processor.php', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'CategoryId', // in this case idfield doesn't exit in destination table - 'StatusField' => Array('PrimaryCat'), // field, that is affected by Approve/Decline events + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'TableName' => TABLE_PREFIX.'CategoryItems', - 'ParentTableKey'=> 'ResourceId', - 'ForeignKey' => 'ItemResourceId', -// 'ParentPrefix' => 'p', - 'AutoDelete' => true, - 'AutoClone' => false, + 'IDField' => 'CategoryId', // in this case idfield doesn't exit in destination table + 'StatusField' => Array ('PrimaryCat'), // field, that is affected by Approve/Decline events - 'CalculatedFields' => Array( - '' => Array ( - 'DummyId' => 'IF(ISNULL(c.CategoryId),0,c.CategoryId)', - 'CategoryStatus'=> 'c.Status', - ) - ), - 'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s - FROM %1$s - LEFT JOIN '.TABLE_PREFIX.'Categories AS c ON c.CategoryId = %1$s.CategoryId', - ), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=>'SELECT * FROM %s', - ), - 'ListSortings' => Array( - '' => Array( - 'Sorting' => Array('CategoryName' => 'asc'), - ) - ), - 'Fields' => Array( - 'DummyId' => Array(), - 'CategoryId' => Array('type'=>'int','not_null'=>1,'default'=>0), - 'ItemResourceId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PrimaryCat' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ItemPrefix' => Array('type' => 'string','not_null'=>1,'default'=>''), - 'Filename' => Array('type' => 'string','not_null'=>1,'default'=>''), - ), + 'TableName' => TABLE_PREFIX.'CategoryItems', + 'ParentTableKey'=> 'ResourceId', + 'ForeignKey' => 'ItemResourceId', +// 'ParentPrefix' => 'p', + 'AutoDelete' => true, + 'AutoClone' => false, - 'VirtualFields' => Array ( - 'CategoryName' => Array ('type' => 'string', 'default' => ''), - 'DummyId' => Array ('type' => 'int', 'default' => 0), - 'CategoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'default' => 1), - ), + 'CalculatedFields' => Array ( + '' => Array ( + 'DummyId' => 'IF(ISNULL(c.CategoryId),0,c.CategoryId)', + 'CategoryStatus'=> 'c.Status', + ) + ), + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s + LEFT JOIN '.TABLE_PREFIX.'Categories AS c ON c.CategoryId = %1$s.CategoryId', + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_item.png', - 1 => 'icon16_primary.png', - ), + 'ListSortings' => Array ( + '' => Array ( + 'Sorting' => Array ('CategoryName' => 'asc'), + ) + ), - 'Fields' => Array ( - 'CategoryName' => Array( 'title'=>'column:la_fld_Category', 'data_block' => 'grid_checkbox_category_td'), - ), - ), - ), - ); \ No newline at end of file + 'Fields' => Array ( + 'DummyId' => Array (), + 'CategoryId' => Array ('type' => 'int', 'not_null'=>1,'default'=>0), + 'ItemResourceId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PrimaryCat' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ItemPrefix' => Array ('type' => 'string', 'not_null'=>1,'default' => ''), + 'Filename' => Array ('type' => 'string', 'not_null'=>1,'default' => ''), + ), + + 'VirtualFields' => Array ( + 'CategoryName' => Array ('type' => 'string', 'default' => ''), + 'DummyId' => Array ('type' => 'int', 'default' => 0), + 'CategoryStatus' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'default' => 1), + ), + + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_item.png', + 1 => 'icon16_primary.png', + ), + + 'Fields' => Array ( + 'CategoryName' => Array ( 'title' => 'column:la_fld_Category', 'data_block' => 'grid_checkbox_category_td'), + ), + ), + ), +); \ No newline at end of file