- Timestamp:
- 12/06/07 13:17:25 (5 years ago)
- Files:
-
- 1 modified
-
lang/php/mumu/trunk/mumu.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/php/mumu/trunk/mumu.php
r2594 r2595 76 76 class MuUtil { 77 77 public static function getpath($basepath, $path) { 78 $basepath = realpath($basepath); 78 79 $o = getcwd(); 79 80 chdir(dirname($basepath)); 80 81 $r = realpath($path); 82 if ($basepath == $realpath) { 83 // avoid include/extends loop 84 return false; 85 } 81 86 chdir($o); 82 87 return $r; … … 230 235 $this->block_dict = $block_dict; 231 236 if ($parentPath && $path) { 232 $epath = MuUtil::getpath($path, $parentPath); 233 if (($this->parent_tfile = MuParser::parse_from_file($epath)) === false) { 234 // TODO: ���顼���������ƥ�졼�������˶����Ƥ����� } 237 if (($epath = MuUtil::getpath($path, $parentPath)) === false 238 || ($this->parent_tfile = MuParser::parse_from_file($epath)) === false) { 239 throw new MuParserException('invalid filename specified on extends'); 240 } 235 241 } 236 242 } … … 303 309 private $tplfile; 304 310 function __construct($includePath, $path) { 305 // FIXME: �������ƥ�����å���̵�¥롼�ץ���å� 306 $epath = MuUtil::getpath($path, $includePath); 307 if (($this->tplfile = MuParser::parse_from_file($epath)) === false) { 308 // TODO: ���顼���������ƥ�졼�������˶����Ƥ����� $this->tplfile = $this->make_errornode('invalidfilename_include'); 311 if (($epath = MuUtil::getpath($path, $includePath)) === false 312 || ($this->tplfile = MuParser::parse_from_file($epath)) === false) { 313 throw new MuParserException('include filename is invalid'); 309 314 } 310 315 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)