--- template.inc.orig Thu Jun 21 08:30:12 2001 +++ template.inc Thu Jun 21 08:36:11 2001 @@ -105,6 +105,7 @@ $str = $this->get_var($parent); $reg = "/(.*)\n\s*/sm"; + $str = ereg_replace( '\$([0-9])', '$\1', $str ); preg_match_all($reg, $str, $m); $str = preg_replace($reg, "{" . "$name}", $str); $this->set_var($handle, $m[1][0]); @@ -122,6 +123,7 @@ if (!is_array($varname)) { if (!empty($varname)) if ($this->debug) print "scalar: set *$varname* to *$value*
\n"; + $value = ereg_replace( '\$([0-9])', '$\1', $value ); $this->varkeys[$varname] = "/".$this->varname($varname)."/"; $this->varvals[$varname] = $value; } else { @@ -129,6 +131,7 @@ while(list($k, $v) = each($varname)) { if (!empty($k)) if ($this->debug) print "array: set *$k* to *$v*
\n"; + $v = ereg_replace( '\$([0-9])', '$\1', $v ); $this->varkeys[$k] = "/".$this->varname($k)."/"; $this->varvals[$k] = $v; } @@ -184,7 +187,7 @@ } function pparse($target, $handle, $append = false) { - print $this->parse($target, $handle, $append); + print $this->finish($this->parse($target, $handle, $append)); return false; } @@ -261,7 +264,7 @@ break; } - return $str; + return ereg_replace('$([0-9])','$\1',$str); } /* public: p(string $varname)