Index: branches/5.2.x/units/affiliate_payment_types/affiliate_payment_types_config.php =================================================================== diff -u -N -r14594 -r16385 --- branches/5.2.x/units/affiliate_payment_types/affiliate_payment_types_config.php (.../affiliate_payment_types_config.php) (revision 14594) +++ branches/5.2.x/units/affiliate_payment_types/affiliate_payment_types_config.php (.../affiliate_payment_types_config.php) (revision 16385) @@ -1,6 +1,6 @@ 'apt', - 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), - 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'AffiliatePaymentTypesEventHandler', 'file' => 'affiliate_payment_types_event_handler.php', 'build_event' => 'OnBuild'), - 'TagProcessorClass' => Array ('class' => 'AffiliatePaymentTypeTagProcessor', 'file' => 'affiliate_payment_types_tp.php', 'build_event' => 'OnBuild'), - 'AutoLoad' => true, - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - 5 => 'mode', - ), +$config = Array ( + 'Prefix' => 'apt', + 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), + 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), + 'EventHandlerClass' => Array ('class' => 'AffiliatePaymentTypesEventHandler', 'file' => 'affiliate_payment_types_event_handler.php', 'build_event' => 'OnBuild'), + 'TagProcessorClass' => Array ('class' => 'AffiliatePaymentTypeTagProcessor', 'file' => 'affiliate_payment_types_tp.php', 'build_event' => 'OnBuild'), - 'IDField' => 'PaymentTypeId', - 'StatusField' => Array ('Status', 'IsPrimary'), // field, that is affected by Approve/Decline events + 'AutoLoad' => true, - 'TitleField' => 'Name', - 'TitlePresets' => Array ( - 'default' => Array ( 'new_status_labels' => Array ('apt' => '!la_title_Adding_Affiliate_Payment_Type!'), - 'edit_status_labels' => Array ('apt' => '!la_title_Editing_Affiliate_Payment_Type!'), - 'new_titlefield' => Array ('apt' => '!la_title_New_Affiliate_Payment_Type!'), - ), + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + 5 => 'mode', + ), - 'affiliate_payment_types_list' => Array ('prefixes' => Array ('apt_List'), 'format' => "!la_title_AffiliatePaymentTypes!"), - 'affiliate_payment_types_edit' => Array ('prefixes' => Array ('apt'), 'format' => "#apt_status# '#apt_titlefield#' - !la_title_General!"), + 'IDField' => 'PaymentTypeId', + 'StatusField' => Array ('Status', 'IsPrimary'), // field, that is affected by Approve/Decline events - ), + 'TitleField' => 'Name', + 'TitlePresets' => Array ( + 'default' => Array ( + 'new_status_labels' => Array ('apt' => '!la_title_Adding_Affiliate_Payment_Type!'), + 'edit_status_labels' => Array ('apt' => '!la_title_Editing_Affiliate_Payment_Type!'), + 'new_titlefield' => Array ('apt' => '!la_title_New_Affiliate_Payment_Type!'), + ), - 'PermSection' => Array ('main' => 'in-commerce:affiliate_payment_types'), + 'affiliate_payment_types_list' => Array ('prefixes' => Array ('apt_List'), 'format' => "!la_title_AffiliatePaymentTypes!"), + 'affiliate_payment_types_edit' => Array ('prefixes' => Array ('apt'), 'format' => "#apt_status# '#apt_titlefield#' - !la_title_General!"), + ), - 'Sections' => Array ( - 'in-commerce:affiliate_payment_types' => Array ( - 'parent' => 'in-commerce:affiliates_folder', - 'icon' => 'affiliates', - 'label' => 'la_tab_AffiliatePaymentTypes', - 'url' => Array ('t' => 'in-commerce/affiliate_plans/affiliate_payment_types_list', 'pass' => 'm'), - 'permissions' => Array ( - 'view', 'add', 'edit', 'delete', 'advanced:approve', - 'advanced:decline', 'advanced:set_primary', 'advanced:move_up', 'advanced:move_down' - ), - 'priority' => 5.3, // ., because this section replaces parent in tree - 'type' => stTAB, - ), - ), + 'PermSection' => Array ('main' => 'in-commerce:affiliate_payment_types'), - 'TableName' => TABLE_PREFIX.'AffiliatePaymentTypes', + 'Sections' => Array ( + 'in-commerce:affiliate_payment_types' => Array ( + 'parent' => 'in-commerce:affiliates_folder', + 'icon' => 'affiliates', + 'label' => 'la_tab_AffiliatePaymentTypes', + 'url' => Array ('t' => 'in-commerce/affiliate_plans/affiliate_payment_types_list', 'pass' => 'm'), + 'permissions' => Array ( + 'view', 'add', 'edit', 'delete', 'advanced:approve', + 'advanced:decline', 'advanced:set_primary', 'advanced:move_up', 'advanced:move_down' + ), + 'priority' => 5.3, // ., because this section replaces parent in tree + 'type' => stTAB, + ), + ), - 'ListSQLs' => Array ('' => 'SELECT * FROM %s'), - 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'), + 'TableName' => TABLE_PREFIX.'AffiliatePaymentTypes', - 'ListSortings' => Array ( - '' => Array ( - 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'), - 'Sorting' => Array ('Name' => 'asc'), - ) - ), + 'ListSQLs' => Array ( + '' => ' SELECT * + FROM %s' + ), - 'Fields' => Array ( - 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), - 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), - 'Status' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'IsPrimary' => Array ( - 'type' => 'int', - 'formatter' => 'kOptionsFormatter', - 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, - 'not_null' => 1, 'default' => 0, - ), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('IsPrimary' => 'desc', 'Priority' => 'desc'), + 'Sorting' => Array ('Name' => 'asc'), + ) + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - '0_0' => 'icon16_disabled.png', - '0_1' => 'icon16_disabled.png', - '1_0' => 'icon16_item.png', - '1_1' => 'icon16_primary.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Name' => Array ( 'data_block' => 'affiliate_payment_type_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'Description' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 200, ), - ), - ), + 'Fields' => Array ( + 'PaymentTypeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Name' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => ''), + 'Description' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL), + 'Status' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_Disabled', 1 => 'la_Active', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'IsPrimary' => Array ( + 'type' => 'int', + 'formatter' => 'kOptionsFormatter', + 'options' => Array ( 0 => 'la_No', 1 => 'la_Yes', ), 'use_phrases' => 1, + 'not_null' => 1, 'default' => 0, + ), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + ), - ), - ); \ No newline at end of file + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + '0_0' => 'icon16_disabled.png', + '0_1' => 'icon16_disabled.png', + '1_0' => 'icon16_item.png', + '1_1' => 'icon16_primary.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'PaymentTypeId' => Array ( 'title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Name' => Array ( 'data_block' => 'affiliate_payment_type_caption_td', 'filter_block' => 'grid_like_filter', 'width' => 200, ), + 'Description' => Array ( 'filter_block' => 'grid_like_filter', 'width' => 200, ), + ), + ), + ), +); \ No newline at end of file