Code Duplication    Length = 9-13 lines in 2 locations

maintenance/cleanupTitles.php 2 locations

@@ 118-126 (lines=9) @@
115
		if ( $this->dryrun ) {
116
			$this->output( "DRY RUN: would rename $row->page_id ($row->page_namespace," .
117
				"'$row->page_title') to ($row->page_namespace,'$dest')\n" );
118
		} else {
119
			$this->output( "renaming $row->page_id ($row->page_namespace," .
120
				"'$row->page_title') to ($row->page_namespace,'$dest')\n" );
121
			$dbw = $this->getDB( DB_MASTER );
122
			$dbw->update( 'page',
123
				[ 'page_title' => $dest ],
124
				[ 'page_id' => $row->page_id ],
125
				__METHOD__ );
126
		}
127
	}
128
129
	/**
@@ 171-183 (lines=13) @@
168
		if ( $this->dryrun ) {
169
			$this->output( "DRY RUN: would rename $row->page_id ($row->page_namespace," .
170
				"'$row->page_title') to ($ns,'$dest')\n" );
171
		} else {
172
			$this->output( "renaming $row->page_id ($row->page_namespace," .
173
				"'$row->page_title') to ($ns,'$dest')\n" );
174
			$dbw = $this->getDB( DB_MASTER );
175
			$dbw->update( 'page',
176
				[
177
					'page_namespace' => $ns,
178
					'page_title' => $dest
179
				],
180
				[ 'page_id' => $row->page_id ],
181
				__METHOD__ );
182
			LinkCache::singleton()->clear();
183
		}
184
	}
185
}
186