Project

General

Profile

« Previous | Next » 

Revision 802

Added by doc about 16 years ago

Added workaround for the template parser class

View differences:

template.inc
1 1
<?php
2

  
3
// $Id$
4

  
2 5
/*
3 6
 * Session Management for PHP3
4 7
 *
......
345 348
    $str = $this->get_var($parent);
346 349
    $reg = "/[ \t]*<!--\s+BEGIN $varname\s+-->\s*?\n?(\s*.*?\n?)\s*<!--\s+END $varname\s+-->\s*?\n?/sm";
347 350
    preg_match_all($reg, $str, $m);
351
/* workaround to avoid problems with some WB files/modules (e.g. massmail)
348 352
    if (!isset($m[1][0])) {
349 353
      $this->halt("set_block: unable to set block $varname.");
350 354
      return false;
351 355
    }
356
*/
352 357
    $str = preg_replace($reg, "{" . $name . "}", $str);
353
    $this->set_var($varname, $m[1][0]);
358
    @$this->set_var($varname, $m[1][0]);
354 359
    $this->set_var($parent, $str);
355 360
    return true;
356 361
  }

Also available in: Unified diff