Changeset 1579
- Timestamp:
- Oct 27, 2006, 2:21:15 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/template.php
r1568 r1579 223 223 { 224 224 $str .= '[\'' . $blocks[$i] . '.\']'; 225 eval('$lastiteration = sizeof(' . $str . ') - 1;');225 eval('$lastiteration = isset('.$str.') ? sizeof('.$str.')-1:0;'); 226 226 $str .= '[' . $lastiteration . ']'; 227 227 } … … 279 279 { 280 280 // Check if it's an absolute or relative path. 281 // if (substr($filename, 0, 1) != '/') 282 if (preg_match('/^[a-z_]/i', $filename)) 281 if (substr($filename, 0, 1) != '/' 282 and substr($filename, 0, 1) != '\\' //Windows UNC path 283 and !preg_match('/^[a-z]:\\\/i', $filename) ) 283 284 { 284 285 $filename = $this->root.'/'.$filename; … … 317 318 318 319 $str = implode("", @file($filename)); 320 319 321 if (empty($str)) 320 322 {
Note: See TracChangeset
for help on using the changeset viewer.