aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/dumpUploads.php
diff options
context:
space:
mode:
authorDerick Alangi <alangiderick@gmail.com>2023-08-31 10:21:12 +0100
committerD3r1ck01 <dalangi-ctr@wikimedia.org>2023-09-04 10:39:58 +0000
commit74033c50cdad88ea029cd2bb81dbd0c24852f0f9 (patch)
tree6154e41671a41e31ce6e1789901da02f11cea5a5 /maintenance/dumpUploads.php
parentf9eb0b8a7aac039a881bdc51e60e1544667d1312 (diff)
downloadmediawikicore-74033c50cdad88ea029cd2bb81dbd0c24852f0f9.tar.gz
mediawikicore-74033c50cdad88ea029cd2bb81dbd0c24852f0f9.zip
maintenance: Begin using `Maintenance::getServiceContainer()`
Maintenance class provides a method for getting a fresh reference of the MW services container instance. Let's make use of these in maintenance scripts now that we have it. NOTE: There are still some static methods like in refreshLinks.php that makes use of services that we can't use this method for now. Change-Id: Idba744057577896fc97c9ecf4724db27542bf01c
Diffstat (limited to 'maintenance/dumpUploads.php')
-rw-r--r--maintenance/dumpUploads.php4
1 files changed, 1 insertions, 3 deletions
diff --git a/maintenance/dumpUploads.php b/maintenance/dumpUploads.php
index 114a9d8a109d..fb423402fff9 100644
--- a/maintenance/dumpUploads.php
+++ b/maintenance/dumpUploads.php
@@ -21,8 +21,6 @@
* @ingroup Maintenance
*/
-use MediaWiki\MediaWikiServices;
-
require_once __DIR__ . '/Maintenance.php';
/**
@@ -114,7 +112,7 @@ By default, outputs relative paths against the parent directory of $wgUploadDire
}
private function outputItem( $name, $shared ) {
- $file = MediaWikiServices::getInstance()->getRepoGroup()->findFile( $name );
+ $file = $this->getServiceContainer()->getRepoGroup()->findFile( $name );
if ( $file && $this->filterItem( $file, $shared ) ) {
$filename = $file->getLocalRefPath();
$rel = wfRelativePath( $filename, $this->mBasePath );