- if( !$title->equals( $current ) ) {
- $this->log( "page $row->page_id ($display) doesn't match self." );
+ if ( $row->page_namespace == NS_FILE && $this->fileExists( $row->page_title ) ) {
+ $this->output( "file $row->page_title needs cleanup, please run cleanupImages.php.\n" );
+ return $this->progress( 0 );
+ } elseif ( is_null( $title ) ) {
+ $this->output( "page $row->page_id ($display) is illegal.\n" );
+ $this->moveIllegalPage( $row );
+ return $this->progress( 1 );
+ } else {
+ $this->output( "page $row->page_id ($display) doesn't match self.\n" );