Index: branches/5.2.x/core/units/agents/agents_config.php =================================================================== diff -u -N -r14718 -r14879 --- branches/5.2.x/core/units/agents/agents_config.php (.../agents_config.php) (revision 14718) +++ branches/5.2.x/core/units/agents/agents_config.php (.../agents_config.php) (revision 14879) @@ -1,6 +1,6 @@ 'agent', + 'Prefix' => 'scheduled-task', 'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'), 'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'), - 'EventHandlerClass' => Array ('class' => 'AgentEventHandler', 'file' => 'agent_eh.php', 'build_event' => 'OnBuild'), + 'EventHandlerClass' => Array ('class' => 'ScheduledTaskEventHandler', 'file' => 'agent_eh.php', 'build_event' => 'OnBuild'), 'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'), 'AutoLoad' => true, @@ -40,42 +40,43 @@ 'HookToEvent' => Array ('OnAfterCacheRebuild'), 'DoPrefix' => '', 'DoSpecial' => '*', - 'DoEvent' => 'OnRefreshAgents', + 'DoEvent' => 'OnRefresh', ), ), - 'IDField' => 'AgentId', + 'IDField' => 'ScheduledTaskId', - 'TableName' => TABLE_PREFIX . 'Agents', + 'TableName' => TABLE_PREFIX . 'ScheduledTasks', - 'TitleField' => 'AgentName', + 'TitleField' => 'Name', 'StatusField' => Array ('Status'), 'TitlePresets' => Array ( 'default' => Array ( - 'new_status_labels' => Array ('agent' => '!la_title_AddingAgent!'), - 'edit_status_labels' => Array ('agent' => '!la_title_EditingAgent!'), - 'new_titlefield' => Array ('agent' => '!la_title_NewAgent!'), + 'new_status_labels' => Array ('scheduled-task' => '!la_title_AddingScheduledTask!'), + 'edit_status_labels' => Array ('scheduled-task' => '!la_title_EditingScheduledTask!'), + 'new_titlefield' => Array ('scheduled-task' => '!la_title_NewScheduledTask!'), ), - 'agent_list' => Array ( - 'prefixes' => Array ('agent_List'), 'format' => "!la_title_Agents!", + 'scheduled_task_list' => Array ( + 'prefixes' => Array ('scheduled-task_List'), 'format' => "!la_title_ScheduledTasks!", 'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'process', 'cancel', 'view', 'dbl-click'), ), - 'agent_edit' => Array ('prefixes' => Array ('agent'), 'format' => "#agent_status# '#agent_titlefield#'", + 'scheduled_task_edit' => Array ( + 'prefixes' => Array ('scheduled-task'), 'format' => "#scheduled-task_status# '#scheduled-task_titlefield#'", 'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'), - ), + ), ), - 'PermSection' => Array('main' => 'in-portal:agents'), + 'PermSection' => Array('main' => 'in-portal:scheduled_tasks'), 'Sections' => Array ( - 'in-portal:agents' => Array ( + 'in-portal:scheduled_tasks' => Array ( 'parent' => 'in-portal:website_setting_folder', 'icon' => 'conf_agents', - 'label' => 'la_title_Agents', + 'label' => 'la_title_ScheduledTasks', 'url' => Array('t' => 'agents/agent_list', 'pass' => 'm'), 'permissions' => Array('view', 'add', 'edit', 'delete'), 'priority' => 6, @@ -89,20 +90,20 @@ 'ListSortings' => Array ( '' => Array ( - 'Sorting' => Array ('AgentName' => 'asc'), + 'Sorting' => Array ('Name' => 'asc'), ) ), 'Fields' => Array ( - 'AgentId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), + 'ScheduledTaskId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0), - 'AgentName' => Array ( + 'Name' => Array ( 'type' => 'string', 'max_len' => 255, 'unique' => Array (), 'required' => 1, 'not_null' => 1, 'default' => '' ), - 'AgentType' => Array ( + 'Type' => Array ( 'type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_User', 2 => 'la_opt_System'), 'use_phrases' => 1, 'required' => 1, 'not_null' => 1, 'default' => 1 @@ -153,9 +154,9 @@ 0 => 'icon16_disabled.png', ), 'Fields' => Array ( - 'AgentId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), - 'AgentName' => Array ('title' => 'column:la_fld_Name', 'filter_block' => 'grid_like_filter', 'width' => 200, ), - 'AgentType' => Array ('title' => 'column:la_fld_Type', 'filter_block' => 'grid_options_filter', 'width' => 60, ), + 'ScheduledTaskId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ), + 'Name' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ), + 'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 60, ), 'Event' => Array ('filter_block' => 'grid_like_filter', 'width' => 280, ), 'RunInterval' => Array ('filter_block' => 'grid_range_filter', 'width' => 100, ), 'RunMode' => Array ('filter_block' => 'grid_options_filter', 'width' => 85, ),