From 1cba24880b9b259361668c7d05968f76ba05a886 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Thu, 11 Oct 2012 15:18:51 +1300 Subject: [PATCH] Fixing deprecated call to Director::redirectBack() --- code/formfields/SubmittedFormReportField.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/formfields/SubmittedFormReportField.php b/code/formfields/SubmittedFormReportField.php index 873e2fa..1a41800 100755 --- a/code/formfields/SubmittedFormReportField.php +++ b/code/formfields/SubmittedFormReportField.php @@ -174,10 +174,10 @@ class SubmittedFormReportField extends FormField { foreach($submissions as $submission) { $submission->delete(); } - return (Director::is_ajax() || $isRunningTests) ? true : Director::redirectBack(); + return (Director::is_ajax() || $isRunningTests) ? true : Controller::curr()->redirectBack(); } } - return (Director::is_ajax() || $isRunningTests) ? false : Director::redirectBack(); + return (Director::is_ajax() || $isRunningTests) ? false : Controller::curr()->redirectBack(); } /** @@ -202,9 +202,9 @@ class SubmittedFormReportField extends FormField { if($submission) { $submission->delete(); - return (Director::is_ajax() || $isRunningTests) ? true : Director::redirectBack(); + return (Director::is_ajax() || $isRunningTests) ? true : Controller::curr()->redirectBack(); } } - return (Director::is_ajax() || $isRunningTests) ? false : Director::redirectBack(); + return (Director::is_ajax() || $isRunningTests) ? false : Controller::curr()->redirectBack(); } }