Follow-up r87176 use wfLocalFile instead of wfFindFile
[lhc/web/wiklou.git] / includes / Export.php
index ceda80b..2c8a748 100644 (file)
@@ -602,8 +602,8 @@ class XmlDumpWriter {
         */
        function writeUploads( $row, $dumpContents = false ) {
                if ( $row->page_namespace == NS_IMAGE ) {
-                       $img = wfFindFile( $row->page_title );
-                       if ( $img ) {
+                       $img = wfLocalFile( $row->page_title );
+                       if ( $img && $img->exists() ) {
                                $out = '';
                                foreach ( array_reverse( $img->getHistory() ) as $ver ) {
                                        $out .= $this->writeUpload( $ver, $dumpContents );