MDL-26294 fix byteserving regression
authorPetr Skoda <commits@skodak.org>
Sat, 12 Feb 2011 19:39:53 +0000 (20:39 +0100)
committerPetr Skoda <commits@skodak.org>
Sat, 12 Feb 2011 19:39:53 +0000 (20:39 +0100)
Credit goes to James Mitchell.

lib/filelib.php

index adaaedc..6d73be9 100644 (file)
@@ -1704,7 +1704,7 @@ function send_file($path, $filename, $lifetime = 'default' , $filter=0, $pathiss
                     $ranges = false;
                 }
                 if ($ranges) {
-                    $handle = fopen($filename, 'rb');
+                    $handle = fopen($path, 'rb');
                     byteserving_send_file($handle, $mimetype, $ranges, $filesize);
                 }
             }