Index: branches/5.2.x/core/units/related_searches/related_searches_config.php =================================================================== diff -u -N -r15012 -r16388 --- branches/5.2.x/core/units/related_searches/related_searches_config.php (.../related_searches_config.php) (revision 15012) +++ branches/5.2.x/core/units/related_searches/related_searches_config.php (.../related_searches_config.php) (revision 16388) @@ -1,6 +1,6 @@ 'search', +$config = Array ( + 'Prefix' => 'search', - 'Clones' => Array( - 'c-search' => Array('ParentPrefix' => 'c'), - ), + 'Clones' => Array ( + 'c-search' => Array ('ParentPrefix' => 'c'), + ), - 'ItemClass' => Array('class'=>'kDBItem','file'=>'','build_event'=>'OnItemBuild'), - 'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'), - 'EventHandlerClass' => Array('class'=>'RelatedSearchEventHandler','file'=>'related_searches_event_handler.php','build_event'=>'OnBuild'), - 'TagProcessorClass' => Array('class'=>'RelatedSearchTagProcessor','file'=>'related_searches_tag_processor.php','build_event'=>'OnBuild'), - 'AutoLoad' => true, + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'RelatedSearchEventHandler', 'file' => 'related_searches_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'RelatedSearchTagProcessor', 'file' => 'related_searches_tag_processor.php', 'build_event' => 'OnBuild'), + 'AutoLoad' => true, - 'QueryString' => Array( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'RelatedSearchId', - 'StatusField' => Array('Enabled'), - 'TableName' => TABLE_PREFIX.'CategoryRelatedSearches', - 'ParentTableKey' => 'ResourceId', - 'ForeignKey' => 'ResourceId', - 'ParentPrefix' => 'c', - 'AutoDelete' => true, - 'AutoClone' => true, + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'ListSQLs' => Array( ''=> 'SELECT %1$s.* %2$s FROM %1$s', - ), // key - special, value - list select sql + 'IDField' => 'RelatedSearchId', + 'StatusField' => Array ('Enabled'), + 'TableName' => TABLE_PREFIX.'CategoryRelatedSearches', + 'ParentTableKey' => 'ResourceId', + 'ForeignKey' => 'ResourceId', + 'ParentPrefix' => 'c', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ListSortings' => Array( - '' => Array( - 'ForcedSorting' => Array('Priority' => 'desc'), - 'Sorting' => Array('Keyword' => 'asc'), - ) - ), - 'ItemSQLs' => Array( '' => 'SELECT %1$s.* %2$s FROM %1$s',), + 'ListSQLs' => Array ( + ''=> ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'Fields' => Array( - 'RelatedSearchId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0), - 'ResourceId' => Array('type'=>'int', 'not_null' => 1, 'required' => 1, 'default' => 0), - 'Keyword' => Array('type'=>'string', 'required' => 1, 'not_null' => 1, 'default' => ''), - 'ItemType' => Array('type'=>'int', 'not_null' => 1, 'required' => 1, 'default' => 0), - 'Enabled' => Array( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 1, - ), - 'Priority' => Array('type'=>'int','not_null'=>1,'default'=>0), - ), - 'VirtualFields' => Array( + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('Priority' => 'desc'), + 'Sorting' => Array ('Keyword' => 'asc'), + ) + ), - ), + 'Fields' => Array ( + 'RelatedSearchId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ResourceId' => Array ('type' => 'int', 'not_null' => 1, 'required' => 1, 'default' => 0), + 'Keyword' => Array ('type' => 'string', 'required' => 1, 'not_null' => 1, 'default' => ''), + 'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'required' => 1, 'default' => 0), + 'Enabled' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array (0 => 'la_Disabled', 1 => 'la_Enabled'), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 1, + ), + 'Priority' => Array ('type' => 'int', 'not_null'=>1,'default'=>0), + ), - 'Grids' => Array( - 'Default' => Array( - 'Icons' => Array( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png' - ), - 'Fields' => Array( - 'RelatedSearchId' => Array( 'title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), - 'Keyword' => Array( 'title'=>'la_col_Keyword', 'data_block' => 'grid_keyword_td', 'filter_block' => 'grid_like_filter'), - 'Enabled' => Array( 'title'=>'column:la_fld_Status', 'filter_block' => 'grid_options_filter'), - ), - ), - ), - ); \ No newline at end of file + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png' + ), + 'Fields' => Array ( + 'RelatedSearchId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter'), + 'Keyword' => Array ( 'title' => 'la_col_Keyword', 'data_block' => 'grid_keyword_td', 'filter_block' => 'grid_like_filter'), + 'Enabled' => Array ( 'title' => 'column:la_fld_Status', 'filter_block' => 'grid_options_filter'), + ), + ), + ), +); \ No newline at end of file