Index: trunk/core/units/categories/categories_config.php =================================================================== diff -u -r3687 -r3787 --- trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 3687) +++ trunk/core/units/categories/categories_config.php (.../categories_config.php) (revision 3787) @@ -1,12 +1,12 @@ 'c', 'ItemClass' => Array('class'=>'CategoriesItem','file'=>'categories_item.php','build_event'=>'OnItemBuild'), 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), 'EventHandlerClass' => Array('class'=>'CategoriesEventHandler','file'=>'categories_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'CategoriesTagProcessor','file'=>'categories_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, + 'AutoLoad' => true, 'QueryString' => Array( 1 => 'id', 2 => 'page', @@ -18,32 +18,33 @@ 'AggregatedTagName' => 'CategoryLink', 'LocalTagName' => 'CategoryLink', ), - ), + ), 'IDField' => 'CategoryId', + 'TitleField' => 'Name', // field, used in bluebar when editing existing item 'ItemType' => 0, // this is used when relation to product is added from in-portal and via-versa 'TableName' => TABLE_PREFIX.'Category', 'ViewMenuPhrase' => 'la_text_Categories', - + 'TitlePresets' => Array( 'category_list' => Array('prefixes' => Array('c_List'), 'format' => "!la_title_Categories! (#c_recordcount#)"), ), - - 'ListSQLs' => Array( ''=> 'SELECT %1$s.* %2$s, - IF(%1$s.NewItem = 2, - IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - 10*3600*24), 1, 0), + + 'ListSQLs' => Array( ''=> 'SELECT %1$s.* %2$s, + IF(%1$s.NewItem = 2, + IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - 10*3600*24), 1, 0), %1$s.NewItem) AS IsNew '. // 10 - Category_NewDays value from ConfigurationValues table 'FROM %1$s LEFT JOIN '.TABLE_PREFIX.'PermCache ON '.TABLE_PREFIX.'PermCache.CategoryId = %1$s.CategoryId'), // key - special, value - list select sql - 'ItemSQLs' => Array( ''=> 'SELECT *, - IF(%1$s.NewItem = 2, - IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - 10*3600*24), 1, 0), - %1$s.NewItem) AS IsNew '. // 10 - Category_NewDays value from ConfigurationValues table + 'ItemSQLs' => Array( ''=> 'SELECT *, + IF(%1$s.NewItem = 2, + IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - 10*3600*24), 1, 0), + %1$s.NewItem) AS IsNew '. // 10 - Category_NewDays value from ConfigurationValues table 'FROM %s'), - - 'ListSortings' => Array( + + 'ListSortings' => Array( '' => Array( 'ForcedSorting' => Array("CurrentSort" => 'asc', 'Priority' => 'desc', 'Name' => 'asc'), 'Sorting' => Array('Name' => 'asc'), @@ -54,7 +55,7 @@ 'CurrentSort' => "REPLACE(ParentPath, CONCAT('|', ".'%1$s'.".CategoryId, '|'), '')", ) ), - + 'Fields' => Array ( 'CategoryId' => Array('type' => 'int','not_null' => '1','default' => ''), @@ -83,18 +84,18 @@ 'Modified' => Array('type' => 'int','not_null' => '1','default' => '0'), 'ModifiedById' => Array('type' => 'int','not_null' => '1','default' => '0'), ), - + 'VirtualFields' => Array( 'CurrentSort' => Array('type' => 'string', 'default' => ''), ), - + 'Grids' => Array( 'Default' => Array( 'Icons' => Array('default'=>'icon16_cat.gif'), 'Fields' => Array( 'Name' => Array( 'width'=>150, 'title'=>'la_col_Title', 'data_block'=>'category_td' ), ), - + ), ), 'ConfigMapping' => Array( @@ -103,7 +104,7 @@ 'DefaultSorting2Field' => 'Category_Sortfield2', 'DefaultSorting1Dir' => 'Category_Sortorder', 'DefaultSorting2Dir' => 'Category_Sortorder2', - ), + ), ); ?> \ No newline at end of file