From ea5db2d23cb8123d36b014f14704bafb69ec0014 Mon Sep 17 00:00:00 2001 From: lLefevre Date: Mon, 17 Oct 2011 08:32:31 +0000 Subject: [PATCH] // fixed bug property currentIndex --- classes/HelperForm.php | 7 ++++--- controllers/admin/AdminRequestSqlController.php | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/classes/HelperForm.php b/classes/HelperForm.php index d7e8c9438..9e601d7c9 100644 --- a/classes/HelperForm.php +++ b/classes/HelperForm.php @@ -83,9 +83,10 @@ class HelperFormCore extends Helper public function getFieldsRequired() { - foreach ($this->fields_form['input'] as $input) - if (array_key_exists('required', $input) && $input['required']) - return true; + if (isset($this->fields_form['input'])) + foreach ($this->fields_form['input'] as $input) + if (array_key_exists('required', $input) && $input['required']) + return true; return false; } diff --git a/controllers/admin/AdminRequestSqlController.php b/controllers/admin/AdminRequestSqlController.php index 8d43bfdba..9630fa7e1 100644 --- a/controllers/admin/AdminRequestSqlController.php +++ b/controllers/admin/AdminRequestSqlController.php @@ -145,8 +145,8 @@ class AdminRequestSqlControllerCore extends AdminController '); $smarty = $this->context->smarty; - - if ($this->display != 'edit' && $this->display != 'add') + + if ($this->display != 'edit' && $this->display != 'add' && $this->display != 'view') $this->display = 'list'; switch ($this->display)