mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Fixing deprecated call to Director::redirectBack()
This commit is contained in:
parent
046ac0696b
commit
1cba24880b
@ -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();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user