From fe0f22527537be4079f1eab0edaf07d6bb72c081 Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Fri, 21 Sep 2007 20:38:22 +0000 Subject: [PATCH] Order of request edit/wizard pages changed. --- application/controllers/RequestController.php | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/application/controllers/RequestController.php b/application/controllers/RequestController.php index ccab99bd..85f5a260 100755 --- a/application/controllers/RequestController.php +++ b/application/controllers/RequestController.php @@ -491,19 +491,18 @@ class RequestController extends Nmc_Controller_Action $currentFormIndex = array_search(strtolower($currentForm), array_map("strtolower", $requestFormOrder)); - if($currentFormIndex === false) { - if (strtolower($currentForm) == 'edit') { - $nextForm = 'Preview'; - } else if ($submit = 'ReturntoEdit') { - $nextForm = 'Edit'; - } else { - $nextForm = $requestFormOrder[count($requestFormOrder) - 1]; - } + + if ($submit == 'ReturntoEdit') { + $nextForm = 'Edit'; + } else if($currentFormIndex === false) { + // if the current form page is something unexpected + $nextForm = 'Preview'; } else if($currentFormIndex < count($requestFormOrder) - 1) { $nextForm = $requestFormOrder[$currentFormIndex + 1]; } else { $nextForm = $requestFormOrder[$currentFormIndex]; } + if($currentFormIndex > 0) { $prevForm = $requestFormOrder[$currentFormIndex - 1]; } else { -- GitLab