Fix error in nextmatchs (oops) switch tpl class to foreach()

This commit is contained in:
Miles Lott 2004-01-02 06:11:21 +00:00
parent cb1f65ec54
commit 6d4b027d1a
2 changed files with 19 additions and 13 deletions

View File

@ -100,8 +100,9 @@
}
else
{
reset($handle);
while(list($h, $f) = each($handle))
// reset($handle);
// while(list($h, $f) = each($handle))
foreach($handle as $h => $f)
{
$this->file[$h] = $this->filename($f);
}
@ -179,8 +180,9 @@
}
$str = $this->get_var($handle);
reset($this->varkeys);
while (list($k, $v) = each($this->varkeys))
// reset($this->varkeys);
// while (list($k, $v) = each($this->varkeys))
foreach($this->varkeys as $k => $v)
{
$str = str_replace($v, $this->varvals[$k], $str);
}
@ -218,8 +220,9 @@
}
else
{
reset($handle);
while(list($i, $h) = each($handle))
// reset($handle);
// while(list($i, $h) = each($handle))
foreach($handle as $i => $h)
{
$str = $this->subst($h);
$this->set_var($target, $str);
@ -250,8 +253,9 @@
*/
function get_vars()
{
reset($this->varkeys);
while(list($k, $v) = each($this->varkeys))
// reset($this->varkeys);
// while(list($k, $v) = each($this->varkeys))
foreach($this->varkeys as $k => $v)
{
$result[$k] = $this->varvals[$k];
}
@ -272,8 +276,9 @@
}
else
{
reset($varname);
while(list($k, $v) = each($varname))
// reset($varname);
// while(list($k, $v) = each($varname))
foreach($varname as $k => $v)
{
$result[$k] = $this->varvals[$k];
}
@ -298,8 +303,9 @@
{
return false;
}
reset($m);
while(list($k, $v) = each($m))
// reset($m);
// while(list($k, $v) = each($m))
foreach($m as $k => $v)
{
if (!isset($this->varkeys[$v]))
{

View File

@ -65,7 +65,7 @@
$this->maxmatches = 15;
}
$this->action = $_GET['menuaction'] ? $_GET['menuaction'];
$this->action = $_GET['menuaction'] ? $_GET['menuaction'] : '';
}
/*!