From 6cfe0680c0fa39a3e975674ea16ec5f820d00df9 Mon Sep 17 00:00:00 2001 From: Sean Harvey Date: Wed, 14 May 2008 10:57:25 +0000 Subject: [PATCH] Added TODO items to fix later --- code/MultiForm.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/MultiForm.php b/code/MultiForm.php index 55a703f..bf219e0 100644 --- a/code/MultiForm.php +++ b/code/MultiForm.php @@ -138,12 +138,10 @@ abstract class MultiForm extends Form { // Determine whether we use the current step, or create one if it doesn't exist if(isset($_GET['StepID'])) { $stepID = (int)$_GET['StepID']; - $step = DataObject::get_one('MultiFormStep', "SessionID = {$this->session->ID} AND ID = {$stepID}"); - if($step) { - $currentStep = $step; - } - // @TODO if you set a wrong ID, then it ends up at this point with a non-object error. + $currentStep = DataObject::get_one('MultiFormStep', "SessionID = {$this->session->ID} AND ID = {$stepID}"); + // @TODO if you set a wrong ID, then it ends up at this point with a non-object error. } elseif($this->session->CurrentStepID) { + // @TODO if you set a wrong ID, then it ends up at this point with a non-object error. $currentStep = $this->session->CurrentStep(); } else { // @TODO fix the fact that you can continually refresh on the first step creating new records