MINOR: removing _GET and replacing it by SS_HTTPRequest based query

This commit is contained in:
Peter Thaleikis 2015-12-13 19:12:51 +13:00
parent c99711da5d
commit 15f4bd08f8

View File

@ -54,6 +54,7 @@ abstract class MultiForm extends Form {
* @var string
*/
private static $get_var = 'MultiFormSessionID';
/**
* These fields are ignored when saving the raw form data into session.
* This ensures only field data is saved, and nothing else that's useless
@ -205,9 +206,15 @@ abstract class MultiForm extends Form {
// Determine whether we use the current step, or create one if it doesn't exist
$currentStep = null;
if(isset($_GET['StepID'])) {
$stepID = (int)$_GET['StepID'];
$currentStep = DataObject::get_one('MultiFormStep', "\"SessionID\" = {$this->session->ID} AND \"ID\" = {$stepID}");
$StepID = $this->controller->request->getVar('StepID');
if(isset($StepID)) {
$currentStep = DataObject::get_one(
'MultiFormStep',
array(
'SessionID' => $this->session->ID,
'ID' => $StepID
)
);
} elseif($this->session->CurrentStepID) {
$currentStep = $this->session->CurrentStep();
}