From 96d906c903934601b86d776792d75fb2bb71037f Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Mon, 15 Dec 2008 03:59:03 +0000 Subject: Update Forge to r168 from upstream. Resolves these issues: http://code.google.com/p/kohanamodules/issues/detail?id=6 http://code.google.com/p/kohanamodules/issues/detail?id=7 --- modules/forge/libraries/Forge.php | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'modules/forge') diff --git a/modules/forge/libraries/Forge.php b/modules/forge/libraries/Forge.php index 04b3640a..f6bca42b 100644 --- a/modules/forge/libraries/Forge.php +++ b/modules/forge/libraries/Forge.php @@ -283,11 +283,17 @@ class Forge_Core { $form_type = 'open'; // See if we need a multipart form - foreach ($this->inputs as $input) - { - if ($input instanceof Form_Upload) - { - $form_type = 'open_multipart'; + $check_inputs = array($this->inputs); + while ($check_inputs) { + foreach (array_shift($check_inputs) as $input) { + if ($input instanceof Form_Upload) + { + $form_type = 'open_multipart'; + } + if ($input instanceof Form_Group) + { + $check_inputs += array($input->inputs); + } } } @@ -310,4 +316,4 @@ class Forge_Core { return (string) $this->render(); } -} // End Forge \ No newline at end of file +} // End Forge -- cgit v1.2.3