From 1a6705a5f1ad6a2b738444f668b7aeff3b71a556 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Tue, 18 Feb 2014 10:12:52 +1300 Subject: [PATCH] Fixing use of deprecated static Director::redirect and redirectBack --- code/TestFileUploadPage.php | 4 ++-- code/TestPage.php | 4 ++-- code/multiform/TestMultiForm.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/TestFileUploadPage.php b/code/TestFileUploadPage.php index eab67e2..9377269 100644 --- a/code/TestFileUploadPage.php +++ b/code/TestFileUploadPage.php @@ -25,6 +25,6 @@ class TestFileUploadPage_Controller extends TestPage_Controller{ $member = new Member(); $form->saveInto($member); $member->write(); - Director::redirectBack(); + $this->redirectBack(); } -} \ No newline at end of file +} diff --git a/code/TestPage.php b/code/TestPage.php index 3fbaef3..0251cf7 100644 --- a/code/TestPage.php +++ b/code/TestPage.php @@ -72,11 +72,11 @@ class TestPage_Controller extends Page_Controller { function save($data, $form) { $form->saveInto($this->dataRecord); $this->dataRecord->write(); - Director::redirectBack(); + $this->redirectBack(); } function gohome() { - Director::redirect("./"); + $this->redirect("./"); } function EmailForm() { diff --git a/code/multiform/TestMultiForm.php b/code/multiform/TestMultiForm.php index 0ce907a..ad6c459 100644 --- a/code/multiform/TestMultiForm.php +++ b/code/multiform/TestMultiForm.php @@ -21,7 +21,7 @@ class TestMultiForm extends MultiForm { Session::set("MultiFormMessage", "Your information has been submitted."); - Director::redirect(Director::BaseURL() . $this->Controller()->URLSegment); + $this->Controller()->redirect(Director::BaseURL() . $this->Controller()->URLSegment); } }