X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupImages.php;h=69281810e648ea88aeb1d505888ca92b46a2f774;hb=203f7aba8c4d3279cd9de7cb479f08b80fb1800a;hp=305a41dddcb585c0a88a361e3d94c6ebd3c6076a;hpb=3e5be2f38a6ad99ff05857bdab2fa0415c451efa;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupImages.php b/maintenance/cleanupImages.php index 305a41dddc..69281810e6 100644 --- a/maintenance/cleanupImages.php +++ b/maintenance/cleanupImages.php @@ -42,6 +42,9 @@ class CleanupImages extends TableCleanup { 'callback' => 'processRow', ]; + /** @var LocalRepo|null */ + private $repo; + public function __construct() { parent::__construct(); $this->addDescription( 'Script to clean up broken, unparseable upload filenames' ); @@ -111,8 +114,12 @@ class CleanupImages extends TableCleanup { } } + /** + * @param string $name + * @return string + */ private function filePath( $name ) { - if ( !isset( $this->repo ) ) { + if ( $this->repo === null ) { $this->repo = RepoGroup::singleton()->getLocalRepo(); }