Code Duplication    Length = 6-12 lines in 2 locations

maintenance/populateParentId.php 1 location

@@ 101-106 (lines=6) @@
98
						[ 'ORDER BY' => 'rev_timestamp DESC' ]
99
					);
100
					# If there is one, let the highest rev ID win
101
					if ( $lastTimestamp ) {
102
						$previousID = $db->selectField( 'revision', 'rev_id',
103
							[ 'rev_page' => $row->rev_page, 'rev_timestamp' => $lastTimestamp ],
104
							__METHOD__,
105
							[ 'ORDER BY' => 'rev_id DESC' ] );
106
					}
107
				}
108
				$previousID = intval( $previousID );
109
				if ( $previousID != $row->rev_parent_id ) {

includes/changetags/ChangeTags.php 1 location

@@ 202-213 (lines=12) @@
199
					],
200
					__METHOD__
201
				);
202
			} elseif ( $rev_id ) {
203
				$rc_id = $dbw->selectField(
204
					[ 'revision', 'recentchanges' ],
205
					'rc_id',
206
					[
207
						'rev_id' => $rev_id,
208
						'rc_timestamp = rev_timestamp',
209
						'rc_this_oldid = rev_id'
210
					],
211
					__METHOD__
212
				);
213
			}
214
		} elseif ( !$log_id && !$rev_id ) {
215
			// Info might be out of date, somewhat fractionally, on replica DB.
216
			$log_id = $dbw->selectField(