more fixes for the legacy stuff as we push forward to new stuff

This commit is contained in:
friendica
2012-07-26 02:27:12 -07:00
parent acfe9e77bf
commit 4ec7ef5223
2 changed files with 5 additions and 4 deletions

View File

@@ -189,7 +189,7 @@
}
public function replace($s, $r) {
// $t1 = dba_timer();
$t1 = dba_timer();
$this->r = $r;
$s = $this->_build_nodes($s);
@@ -200,15 +200,15 @@
// remove comments block
$s = preg_replace('/{#[^#]*#}/', "" , $s);
// $t2 = dba_timer();
$t2 = dba_timer();
// replace strings recursively (limit to 10 loops)
$os = ""; $count=0;
while($os!=$s && $count<10){
while(($os !== $s) && $count<10){
$os=$s; $count++;
$s = $this->var_replace($s);
}
// $t3 = dba_timer();
$t3 = dba_timer();
// logger('macro timer: ' . sprintf('%01.4f %01.4f',$t3 - $t2, $t2 - $t1));
return $s;