Fixing deprecated call to Director::redirectBack()

This commit is contained in:
Sean Harvey 2012-10-11 15:18:51 +13:00
parent 046ac0696b
commit 1cba24880b

View File

@ -174,10 +174,10 @@ class SubmittedFormReportField extends FormField {
foreach($submissions as $submission) { foreach($submissions as $submission) {
$submission->delete(); $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) { if($submission) {
$submission->delete(); $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();
} }
} }