From aa1b40f258a5332e8d1f25482d9ebbdd1a8346ef Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 10 Jun 2010 15:36:43 +0000 Subject: [PATCH] more flexibility for meta HTML --- lam/lib/modules.inc | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/lam/lib/modules.inc b/lam/lib/modules.inc index 732196b4..bd38cc82 100644 --- a/lam/lib/modules.inc +++ b/lam/lib/modules.inc @@ -707,7 +707,15 @@ function parseHtml($module, $input, $values, $restricted, &$tabindex, $scope) { return $input->generateHTML($module, $input, $values, $restricted, $tabindex, $scope); } $ret = array(); - if (is_array($input)) { + if (is_array($input) && (sizeof($input) > 0)) { + // check for array of metaHTML objects + if ($input[0] instanceof htmlElement) { + $return = array(); + for ($i = 0; $i < sizeof($input); $i++) { + $return = array_merge($return, $input[$i]->generateHTML($module, $input, $values, $restricted, $tabindex, $scope)); + } + return $return; + } echo "\n"; for ($i=0; $i"; $ret[$input[$i][$j]['name']] = 'textarea'; // save type @@ -1246,7 +1256,6 @@ class accountContainer { $y = 5000; parseHtml($this->order[$this->current_page], $return, array(), false, $y, $this->type); // Display rest of html-page - echo "
*" . _('required'); echo "
\n"; $this->printPageFooter(); }