From 4ce9f05ebf634142b5647954e5688c9a4348badc Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Wed, 3 Oct 2018 15:16:36 +1300 Subject: [PATCH] Fix #124 use correct urls in redirects. --- delete.php | 4 ++-- edit.php | 4 ++-- finish.php | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/delete.php b/delete.php index 21dd274..eb594a2 100644 --- a/delete.php +++ b/delete.php @@ -36,10 +36,10 @@ $PAGE->set_url(new moodle_url('/auth/outage/manage.php')); $mform = new delete(); if ($mform->is_cancelled()) { - redirect('/auth/outage/manage.php'); + redirect(new moodle_url('/auth/outage/manage.php')); } else if ($fromform = $mform->get_data()) { outagedb::delete($fromform->id); - redirect('/auth/outage/manage.php'); + redirect(new moodle_url('/auth/outage/manage.php')); } $id = required_param('id', PARAM_INT); diff --git a/edit.php b/edit.php index a2008df..4beda3d 100644 --- a/edit.php +++ b/edit.php @@ -39,10 +39,10 @@ $PAGE->set_url(new moodle_url('/auth/outage/manage.php')); $mform = new edit(); if ($mform->is_cancelled()) { - redirect('/auth/outage/manage.php'); + redirect(new moodle_url('/auth/outage/manage.php')); } else if ($outage = $mform->get_data()) { $id = outagedb::save($outage); - redirect('/auth/outage/manage.php#auth_outage_id_'.$id); + redirect($CFG->wwwroot. '/auth/outage/manage.php#auth_outage_id_'.$id); } $clone = optional_param('clone', 0, PARAM_INT); diff --git a/finish.php b/finish.php index 4a42054..047e3eb 100644 --- a/finish.php +++ b/finish.php @@ -36,10 +36,10 @@ $PAGE->set_url(new moodle_url('/auth/outage/manage.php')); $mform = new finish(); if ($mform->is_cancelled()) { - redirect('/auth/outage/manage.php'); + redirect(new moodle_url('/auth/outage/manage.php')); } else if ($fromform = $mform->get_data()) { outagedb::finish($fromform->id); - redirect('/auth/outage/manage.php'); + redirect(new moodle_url('/auth/outage/manage.php')); } $id = required_param('id', PARAM_INT);