Changeset 1631 in subversion
- Timestamp:
- Aug 6, 2008 5:25:45 AM (5 years ago)
- Location:
- trunk/roundcubemail/program
- Files:
-
- 3 edited
-
include/rcube_mdb2.php (modified) (1 diff)
-
include/rcube_template.php (modified) (3 diffs)
-
lib/html2text.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/roundcubemail/program/include/rcube_mdb2.php
r1390 r1631 567 567 return; 568 568 569 $data = ''; 570 if ($fd = fopen($file_name, 'r')) 571 { 572 $data = fread($fd, filesize($file_name)); 573 fclose($fd); 574 } 569 $data = file_get_contents($file_name); 575 570 576 571 if (strlen($data)) -
trunk/roundcubemail/program/include/rcube_template.php
r1589 r1631 300 300 { 301 301 $skin_path = $this->config['skin_path']; 302 $path = "$skin_path/templates/$name.html"; 302 303 303 304 // read template file 304 $templ = ''; 305 $path = "$skin_path/templates/$name.html"; 306 307 if (($fp = fopen($path, 'r')) === false) { 308 $message = ''; 305 if (($templ = file_get_contents($path)) === false) { 309 306 ob_start(); 310 f open($path, 'r');311 $message .= ob_get_contents();307 file_get_contents($path); 308 $message = ob_get_contents(); 312 309 ob_end_clean(); 313 310 raise_error(array( … … 320 317 return false; 321 318 } 322 $templ = fread($fp, filesize($path));323 fclose($fp);324 319 325 320 // parse for specialtags … … 530 525 case 'include': 531 526 $path = realpath($this->config['skin_path'].$attrib['file']); 532 if ( $fsize = filesize($path)) {527 if (is_readable($path)) { 533 528 if ($this->config['skin_include_php']) { 534 529 $incl = $this->include_php($path); 535 530 } 536 else if ($fp = fopen($path, 'r')) { 537 $incl = fread($fp, $fsize); 538 fclose($fp); 539 } 531 else { 532 $incl = file_get_contents($path); 533 } 540 534 return $this->parse_xml($incl); 541 535 } -
trunk/roundcubemail/program/lib/html2text.php
r1291 r1631 275 275 function set_html( $source, $from_file = false ) 276 276 { 277 $this->html = $source;278 279 277 if ( $from_file && file_exists($source) ) { 280 $ fp = fopen($source, 'r');281 $this->html = fread($fp, filesize($source));282 fclose($fp); 283 }278 $this->html = file_get_contents($source); 279 } 280 else 281 $this->html = $source; 284 282 285 283 $this->_converted = false;
Note: See TracChangeset
for help on using the changeset viewer.
