changed argument-order of isset_array to be the same as in set_array and get_array: isset_array($arr,$idx)

This commit is contained in:
Ralf Becker 2002-06-15 09:21:55 +00:00
parent 47ea887c92
commit fd6c630234
3 changed files with 13 additions and 9 deletions

View File

@ -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 @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)) if (ereg('^([^[]*)\\[(.*)\\]$',$idx,$regs))
{ {

View File

@ -228,7 +228,7 @@
list($nul,$cell) = each($cols); reset($cols); list($nul,$cell) = each($cols); reset($cols);
if (!($this->autorepeat_idx($cols['A'],0,$r,$idx,$idx_cname) && $idx_cname) && 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->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 break; // no auto-row-repeat
} }
@ -246,7 +246,7 @@
{ {
$cell = $old_cell; $cell = $old_cell;
if (!$this->autorepeat_idx($cell,$c,$r,$idx,$idx_cname,True) || 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 break; // no auto-col-repeat
} }
@ -315,6 +315,10 @@
} }
list($span) = explode(',',$cell['span']); // evtl. overriten later for type template 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); $name = $this->expand_name($cell['name'],$show_c,$show_row,$content['.c'],$content['.row'],$content);
if (strstr($name,'|')) // extension which uses whole content array if (strstr($name,'|')) // extension which uses whole content array
@ -590,9 +594,9 @@
$cols = $old_cols; $cols = $old_cols;
list($nul,$cell) = each($cols); reset($cols); list($nul,$cell) = each($cols); reset($cols);
if ((!$this->autorepeat_idx($cols['A'],0,$r,$idx,$idx_cname) || 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) || (!$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 break; // no auto-row-repeat
} }
@ -605,7 +609,7 @@
{ {
$cell = $old_cell; $cell = $old_cell;
if (!$this->autorepeat_idx($cell,$c,$r,$idx,$idx_cname,True) || 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 break; // no auto-col-repeat
} }

View File

@ -312,7 +312,7 @@
list($nul,$cell) = each($cols); reset($cols); list($nul,$cell) = each($cols); reset($cols);
if (!($this->autorepeat_idx($cols['A'],0,$r,$idx,$idx_cname) && $idx_cname) && 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->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 break; // no auto-row-repeat
} }
@ -341,7 +341,7 @@
{ {
$cell = $old_cell; $cell = $old_cell;
if (!$this->autorepeat_idx($cell,$c,$r,$idx,$idx_cname,True) || 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 break; // no auto-col-repeat
} }