summaryrefslogtreecommitdiff
path: root/maintenance/cleanupImages.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/cleanupImages.php')
-rw-r--r--maintenance/cleanupImages.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/maintenance/cleanupImages.php b/maintenance/cleanupImages.php
index 3ec2c443..1c0edeb5 100644
--- a/maintenance/cleanupImages.php
+++ b/maintenance/cleanupImages.php
@@ -89,7 +89,10 @@ class ImageCleanup extends TableCleanup {
}
function filePath( $name ) {
- return wfImageDir( $name ) . "/$name";
+ if ( !isset( $this->repo ) ) {
+ $this->repo = RepoGroup::singleton()->getLocalRepo();
+ }
+ return $this->repo->getRootDirectory() . '/' . $this->repo->getHashPath( $name ) . $name;
}
function pokeFile( $orig, $new ) {
@@ -164,4 +167,4 @@ $wgUser->setName( 'Conversion script' );
$caps = new ImageCleanup( !isset( $options['fix'] ) );
$caps->cleanup();
-?>
+