aboutsummaryrefslogtreecommitdiffstats
path: root/maintenance/cleanupImages.php
diff options
context:
space:
mode:
authorSam Reed <reedy@users.mediawiki.org>2011-10-18 17:31:54 +0000
committerSam Reed <reedy@users.mediawiki.org>2011-10-18 17:31:54 +0000
commite336b5e951ed31eef3ddeb9c2e4abbb06f070c34 (patch)
tree6a5bc16a63d1add5f69a80c2353433d97d023f8f /maintenance/cleanupImages.php
parent1963886af9bf04123a9d6ac6343eab7fc9bab322 (diff)
downloadmediawikicore-e336b5e951ed31eef3ddeb9c2e4abbb06f070c34.tar.gz
mediawikicore-e336b5e951ed31eef3ddeb9c2e4abbb06f070c34.zip
Remove some unused getting of non existent arguments
Documentation
Notes
Notes: http://mediawiki.org/wiki/Special:Code/MediaWiki/100130
Diffstat (limited to 'maintenance/cleanupImages.php')
-rw-r--r--maintenance/cleanupImages.php12
1 files changed, 7 insertions, 5 deletions
diff --git a/maintenance/cleanupImages.php b/maintenance/cleanupImages.php
index 267061009ac7..81d1c85bdaf7 100644
--- a/maintenance/cleanupImages.php
+++ b/maintenance/cleanupImages.php
@@ -73,8 +73,9 @@ class ImageCleanup extends TableCleanup {
if ( is_null( $title ) ) {
$this->output( "page $source ($cleaned) is illegal.\n" );
$safe = $this->buildSafeTitle( $cleaned );
- if ( $safe === false )
+ if ( $safe === false ) {
return $this->progress( 0 );
+ }
$this->pokeFile( $source, $safe );
return $this->progress( 1 );
}
@@ -86,7 +87,7 @@ class ImageCleanup extends TableCleanup {
return $this->progress( 1 );
}
- $this->progress( 0 );
+ return $this->progress( 0 );
}
/**
@@ -123,7 +124,8 @@ class ImageCleanup extends TableCleanup {
$path = $this->filePath( $orig );
if ( !file_exists( $path ) ) {
$this->output( "missing file: $path\n" );
- return $this->killRow( $orig );
+ $this->killRow( $orig );
+ return;
}
$db = wfGetDB( DB_MASTER );
@@ -138,7 +140,7 @@ class ImageCleanup extends TableCleanup {
$version = 0;
$final = $new;
$conflict = ( $this->imageExists( $final, $db ) ||
- ( $this->pageExists( $orig, $db ) && $this->pageExists( $final, $db ) ) );
+ ( $this->pageExists( $orig, $db ) && $this->pageExists( $final, $db ) ) );
while ( $conflict ) {
$this->output( "Rename conflicts with '$final'...\n" );
@@ -170,7 +172,7 @@ class ImageCleanup extends TableCleanup {
$dir = dirname( $finalPath );
if ( !file_exists( $dir ) ) {
if ( !wfMkdirParents( $dir, null, __METHOD__ ) ) {
- $this->log( "RENAME FAILED, COULD NOT CREATE $dir" );
+ $this->output( "RENAME FAILED, COULD NOT CREATE $dir" );
$db->rollback();
return;
}