Merge "Re add wpScrolltop id in EditPage"
[lhc/web/wiklou.git] / maintenance / dumpUploads.php
index ec276c1..8d63fe5 100644 (file)
@@ -76,7 +76,7 @@ By default, outputs relative paths against the parent directory of $wgUploadDire
         * @param bool $shared True to pass shared-dir settings to hash func
         */
        function fetchUsed( $shared ) {
-               $dbr = $this->getDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_REPLICA );
                $image = $dbr->tableName( 'image' );
                $imagelinks = $dbr->tableName( 'imagelinks' );
 
@@ -97,7 +97,7 @@ By default, outputs relative paths against the parent directory of $wgUploadDire
         * @param bool $shared True to pass shared-dir settings to hash func
         */
        function fetchLocal( $shared ) {
-               $dbr = $this->getDB( DB_SLAVE );
+               $dbr = $this->getDB( DB_REPLICA );
                $result = $dbr->select( 'image',
                        [ 'img_name' ],
                        '',
@@ -111,7 +111,7 @@ By default, outputs relative paths against the parent directory of $wgUploadDire
        function outputItem( $name, $shared ) {
                $file = wfFindFile( $name );
                if ( $file && $this->filterItem( $file, $shared ) ) {
-                       $filename = $file->getPath();
+                       $filename = $file->getLocalRefPath();
                        $rel = wfRelativePath( $filename, $this->mBasePath );
                        $this->output( "$rel\n" );
                } else {