Index: trunk/phase3/includes/StreamFile.php |
— | — | @@ -19,18 +19,23 @@ |
20 | 20 | * @return bool Success |
21 | 21 | */ |
22 | 22 | public static function stream( $fname, $headers = array(), $sendErrors = true ) { |
| 23 | + wfProfileIn( __METHOD__ ); |
| 24 | + |
23 | 25 | wfSuppressWarnings(); |
24 | 26 | $stat = stat( $fname ); |
25 | 27 | wfRestoreWarnings(); |
26 | 28 | |
27 | 29 | $res = self::prepareForStream( $fname, $stat, $headers, $sendErrors ); |
28 | 30 | if ( $res == self::NOT_MODIFIED ) { |
29 | | - return true; // use client cache |
| 31 | + $ok = true; // use client cache |
30 | 32 | } elseif ( $res == self::READY_STREAM ) { |
31 | | - return readfile( $fname ); |
| 33 | + $ok = readfile( $fname ); |
32 | 34 | } else { |
33 | | - return false; // failed |
| 35 | + $ok = false; // failed |
34 | 36 | } |
| 37 | + |
| 38 | + wfProfileOut( __METHOD__ ); |
| 39 | + return $ok; |
35 | 40 | } |
36 | 41 | |
37 | 42 | /** |