diff --git a/etemplate/inc/class.boetemplate.inc.php b/etemplate/inc/class.boetemplate.inc.php index 7fed8dc4a7..0829999c13 100644 --- a/etemplate/inc/class.boetemplate.inc.php +++ b/etemplate/inc/class.boetemplate.inc.php @@ -267,10 +267,10 @@ } /*! - @function isset_array($idx,$arr) + @function isset_array($arr,$idx) @abstract checks if idx, which may contain ONE subindex is set in array */ - function isset_array($idx,$arr) + function isset_array($arr,$idx) { if (ereg('^([^[]*)\\[(.*)\\]$',$idx,$regs)) { diff --git a/etemplate/inc/class.uietemplate.inc.php b/etemplate/inc/class.uietemplate.inc.php index 7c6c83ff70..e714b40b83 100644 --- a/etemplate/inc/class.uietemplate.inc.php +++ b/etemplate/inc/class.uietemplate.inc.php @@ -228,7 +228,7 @@ list($nul,$cell) = each($cols); reset($cols); if (!($this->autorepeat_idx($cols['A'],0,$r,$idx,$idx_cname) && $idx_cname) && !($this->autorepeat_idx($cols['B'],1,$r,$idx,$idx_cname) && $idx_cname) || - !$this->isset_array($idx,$content)) + !$this->isset_array($content,$idx)) { break; // no auto-row-repeat } @@ -246,7 +246,7 @@ { $cell = $old_cell; if (!$this->autorepeat_idx($cell,$c,$r,$idx,$idx_cname,True) || - !$this->isset_array($idx,$content)) + !$this->isset_array($content,$idx)) { break; // no auto-col-repeat } @@ -315,6 +315,10 @@ } list($span) = explode(',',$cell['span']); // evtl. overriten later for type template + if ($cell['name'][0] == '@') + { + $cell['name'] = $this->get_array($content,substr($cell['name'],1)); + } $name = $this->expand_name($cell['name'],$show_c,$show_row,$content['.c'],$content['.row'],$content); if (strstr($name,'|')) // extension which uses whole content array @@ -590,9 +594,9 @@ $cols = $old_cols; list($nul,$cell) = each($cols); reset($cols); if ((!$this->autorepeat_idx($cols['A'],0,$r,$idx,$idx_cname) || - $idx_cname == '' || !$this->isset_array($idx,$content)) && + $idx_cname == '' || !$this->isset_array($content,$idx)) && (!$this->autorepeat_idx($cols['B'],1,$r,$idx,$idx_cname) || - $idx_cname == '' || !$this->isset_array($idx,$content))) + $idx_cname == '' || !$this->isset_array($content,$idx))) { break; // no auto-row-repeat } @@ -605,7 +609,7 @@ { $cell = $old_cell; if (!$this->autorepeat_idx($cell,$c,$r,$idx,$idx_cname,True) || - $idx_cname == '' || !$this->isset_array($idx,$content)) + $idx_cname == '' || !$this->isset_array($content,$idx)) { break; // no auto-col-repeat } diff --git a/etemplate/inc/class.uietemplate_gtk.inc.php b/etemplate/inc/class.uietemplate_gtk.inc.php index 1f6f2eed0b..8270f27458 100644 --- a/etemplate/inc/class.uietemplate_gtk.inc.php +++ b/etemplate/inc/class.uietemplate_gtk.inc.php @@ -312,7 +312,7 @@ list($nul,$cell) = each($cols); reset($cols); if (!($this->autorepeat_idx($cols['A'],0,$r,$idx,$idx_cname) && $idx_cname) && !($this->autorepeat_idx($cols['B'],1,$r,$idx,$idx_cname) && $idx_cname) || - !$this->isset_array($idx,$content)) + !$this->isset_array($content,$idx)) { break; // no auto-row-repeat } @@ -341,7 +341,7 @@ { $cell = $old_cell; if (!$this->autorepeat_idx($cell,$c,$r,$idx,$idx_cname,True) || - !$this->isset_array($idx,$content)) + !$this->isset_array($content,$idx)) { break; // no auto-col-repeat }