]> git.wh0rd.org Git - tt-rss.git/commitdiff
replace fopen/fread loop with readfile
authorAndrew Dolgov <fox@fakecake.org>
Sun, 31 Mar 2013 05:54:52 +0000 (09:54 +0400)
committerAndrew Dolgov <fox@fakecake.org>
Sun, 31 Mar 2013 05:54:52 +0000 (09:54 +0400)
image.php

index 60f2cc8397bad2f3ce47c09d2b1abc3b950a8a2e..94cb8e8174b262e3973651aee49e171d17400593 100644 (file)
--- a/image.php
+++ b/image.php
                        $stamp = gmdate("D, d M Y H:i:s", filemtime($filename)). " GMT";
                        header("Last-Modified: $stamp", true);
 
-                       $fp = fopen($filename, "r");
-
-                       if ($fp) {
-                               while ($data = fread($fp, 32768)) {
-                                       print $data;
-                               }
-                               fclose($fp);
-                       }
+                       readfile($filename);
 
                } else {
                        header($_SERVER["SERVER_PROTOCOL"]." 404 Not Found");