Merge "Remove unused WikiPage::getLastNAuthors() method"
[lhc/web/wiklou.git] / includes / filerepo / FileRepo.php
index e79c06b..647dbec 100644 (file)
@@ -1595,13 +1595,26 @@ class FileRepo {
         *
         * @param string $virtualUrl
         * @param array $headers Additional HTTP headers to send on success
-        * @return bool Success
+        * @return Status
+        * @since 1.27
         */
-       public function streamFile( $virtualUrl, $headers = array() ) {
+       public function streamFileWithStatus( $virtualUrl, $headers = array() ) {
                $path = $this->resolveToStoragePath( $virtualUrl );
                $params = array( 'src' => $path, 'headers' => $headers );
 
-               return $this->backend->streamFile( $params )->isOK();
+               return $this->backend->streamFile( $params );
+       }
+
+       /**
+        * Attempt to stream a file with the given virtual URL/storage path
+        *
+        * @deprecated since 1.26, use streamFileWithStatus
+        * @param string $virtualUrl
+        * @param array $headers Additional HTTP headers to send on success
+        * @return bool Success
+        */
+       public function streamFile( $virtualUrl, $headers = array() ) {
+               return $this->streamFileWithStatus( $virtualUrl, $headers )->isOK();
        }
 
        /**