From 680643c4f9099daa0fd216a5a79bf1871941e22e Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 31 May 2010 09:42:39 -0700 Subject: [PATCH] Extend the admin scheduler controller from the admin maintenance controller to pick up the existing maintenance controller functionality. Add a config/routes.php which routes all admin/maintenance requests to the admin/schedule controller. --- modules/scheduler/config/routes.php | 22 +++++++++++++++++++ .../scheduler/controllers/admin_schedule.php | 6 ++--- 2 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 modules/scheduler/config/routes.php diff --git a/modules/scheduler/config/routes.php b/modules/scheduler/config/routes.php new file mode 100644 index 00000000..48118d66 --- /dev/null +++ b/modules/scheduler/config/routes.php @@ -0,0 +1,22 @@ +name = $schedule->name; - $v->form = new Forge("admin/schedule/remove/{$id}", "", "post", + $v->form = new Forge("admin/schedule/remove_event/{$id}", "", "post", array("id" => "g-remove-schedule")); $group = $v->form->group("remove"); $group->submit("")->value(t("Continue")); print $v; } - public function remove($id) { + public function remove_event($id) { access::verify_csrf(); $schedule = ORM::factory("schedule", $id); $schedule->delete();