if ( $source == '' ) {
// Ye olde empty rows. Just kill them.
$this->killRow( $source );
+
return $this->progress( 1 );
}
return $this->progress( 0 );
}
$this->pokeFile( $source, $safe );
+
return $this->progress( 1 );
}
$munged = $title->getDBkey();
$this->output( "page $source ($munged) doesn't match self.\n" );
$this->pokeFile( $source, $munged );
+
return $this->progress( 1 );
}
if ( !isset( $this->repo ) ) {
$this->repo = RepoGroup::singleton()->getLocalRepo();
}
+
return $this->repo->getRootDirectory() . '/' . $this->repo->getHashPath( $name ) . $name;
}
if ( !file_exists( $path ) ) {
$this->output( "missing file: $path\n" );
$this->killRow( $orig );
+
return;
}
$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" );
if ( !wfMkdirParents( $dir, null, __METHOD__ ) ) {
$this->output( "RENAME FAILED, COULD NOT CREATE $dir" );
$db->rollback( __METHOD__ );
+
return;
}
}
$test = Title::makeTitleSafe( NS_FILE, $x );
if ( is_null( $test ) || $test->getDBkey() !== $x ) {
$this->error( "Unable to generate safe title from '$name', got '$x'" );
+
return false;
}