diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-02 14:34:50 -0800 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2010-02-02 14:34:50 -0800 |
commit | 19fee6b5e4ceb8a5f90cafe4ad770856ece108ef (patch) | |
tree | 7311805e500ceae811dd7b1220892fc5eddf25a4 /modules/gallery/controllers/admin_maintenance.php | |
parent | 8a9301f756f5ed033bd86a9e275d6ed6e489c27f (diff) |
Refactor the admin maintenance screen so that events are used to pupluate the action buttons and other content such as the list of scheduled tasks.
Diffstat (limited to 'modules/gallery/controllers/admin_maintenance.php')
-rw-r--r-- | modules/gallery/controllers/admin_maintenance.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/modules/gallery/controllers/admin_maintenance.php b/modules/gallery/controllers/admin_maintenance.php index 487e77a6..8e4845a9 100644 --- a/modules/gallery/controllers/admin_maintenance.php +++ b/modules/gallery/controllers/admin_maintenance.php @@ -44,10 +44,17 @@ class Admin_Maintenance_Controller extends Admin_Controller { $view->content->task_definitions = task::get_definitions(); $view->content->running_tasks = ORM::factory("task") ->where("done", "=", 0)->order_by("updated", "DESC")->find_all(); - $view->content->schedule_definitions = - module::is_active("scheduler") ? scheduler::get_definitions() : ""; $view->content->finished_tasks = ORM::factory("task") ->where("done", "=", 1)->order_by("updated", "DESC")->find_all(); + $task_buttons = + new ArrayObject(array((object)array("text" => t("run"), + "url" =>url::site("admin/maintenance/start")))); + module::event("admin_maintenance_task_buttons", $task_buttons); + $view->content->task_buttons = $task_buttons; + + $maintenance_content = new ArrayObject(); + module::event("admin_maintenance_content", $maintenance_content); + $view->content->task_maintenance_content = $maintenance_content; print $view; } |