Follow-up r87176 use wfLocalFile instead of wfFindFile
authorBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 15 May 2011 10:43:51 +0000 (10:43 +0000)
committerBryan Tong Minh <btongminh@users.mediawiki.org>
Sun, 15 May 2011 10:43:51 +0000 (10:43 +0000)
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 );