Index: branches/5.2.x/units/poll_answers/poll_answers_config.php =================================================================== diff -u -N -r14581 -r16384 --- branches/5.2.x/units/poll_answers/poll_answers_config.php (.../poll_answers_config.php) (revision 14581) +++ branches/5.2.x/units/poll_answers/poll_answers_config.php (.../poll_answers_config.php) (revision 16384) @@ -1,6 +1,6 @@ 'poll-answer', +$config = Array ( + 'Prefix' => 'poll-answer', - '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, + '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'), - 'QueryString' => Array ( - 1 => 'id', - 2 => 'Page', - 3 => 'PerPage', - 4 => 'event', - ), - 'IDField' => 'AnswerId', - 'TableName' => TABLE_PREFIX . 'PollsAnswers', + 'AutoLoad' => true, - 'ParentPrefix' => 'poll', - 'ForeignKey' => 'PollId', - 'ParentTableKey' => 'PollId', - 'AutoDelete' => true, - 'AutoClone' => true, + 'QueryString' => Array ( + 1 => 'id', + 2 => 'Page', + 3 => 'PerPage', + 4 => 'event', + ), - 'TitleField' => 'Answer', - 'StatusField' => Array ('Status'), + 'IDField' => 'AnswerId', + 'TableName' => TABLE_PREFIX . 'PollsAnswers', - // key - special, value - list select sql - 'ListSQLs' => Array ( - '' => ' SELECT %1$s.* %2$s - FROM %1$s - ', - ), + 'ParentPrefix' => 'poll', + 'ForeignKey' => 'PollId', + 'ParentTableKey' => 'PollId', + 'AutoDelete' => true, + 'AutoClone' => true, - 'ItemSQLs' => Array ('' => 'SELECT * FROM %s'), + 'TitleField' => 'Answer', + 'StatusField' => Array ('Status'), - 'ListSortings' => Array ( - '' => Array( - 'ForcedSorting' => Array('Priority' => 'desc'), - 'Sorting' => Array('Answer' => 'asc'), - ) - ), + // key - special, value - list select sql + 'ListSQLs' => Array ( + '' => ' SELECT %1$s.* %2$s + FROM %1$s', + ), - 'Fields' => Array ( - 'AnswerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Answer' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'using_fck' => 1, 'default' => '', 'required' => 1), - 'VotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1), - ), + 'ListSortings' => Array ( + '' => Array ( + 'ForcedSorting' => Array ('Priority' => 'desc'), + 'Sorting' => Array ('Answer' => 'asc'), + ) + ), - 'Grids' => Array ( - 'Default' => Array ( - 'Icons' => Array ( - 'default' => 'icon16_item.png', - 0 => 'icon16_disabled.png', - 1 => 'icon16_item.png', - 2 => 'icon16_pending.png', - 'module' => 'core', - ), - 'Fields' => Array ( - 'AnswerId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), - 'Answer' => Array ('data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 300, ), - 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), - 'VotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + 'Fields' => Array ( + 'AnswerId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'PollId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Answer' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'using_fck' => 1, 'default' => '', 'required' => 1), + 'VotesQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Active', 0 => 'la_opt_Disabled'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1), + ), - ), - ), + 'Grids' => Array ( + 'Default' => Array ( + 'Icons' => Array ( + 'default' => 'icon16_item.png', + 0 => 'icon16_disabled.png', + 1 => 'icon16_item.png', + 2 => 'icon16_pending.png', + 'module' => 'core', + ), + 'Fields' => Array ( + 'AnswerId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ), + 'Answer' => Array ('data_block' => 'grid_priority_td', 'filter_block' => 'grid_like_filter', 'width' => 300, ), + 'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ), + 'VotesQty' => Array ('title' => 'la_col_VoteCount', 'filter_block' => 'grid_like_filter', 'width' => 100, ), + ), ), - - ); \ No newline at end of file + ), +); \ No newline at end of file