Code Duplication    Length = 5-7 lines in 3 locations

includes/specials/SpecialRecentchangeslinked.php 1 location

@@ 98-102 (lines=5) @@
95
				'wl_namespace=rc_namespace'
96
			] ];
97
		}
98
		if ( $this->getUser()->isAllowed( 'rollback' ) ) {
99
			$tables[] = 'page';
100
			$join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
101
			$select[] = 'page_latest';
102
		}
103
		ChangeTags::modifyDisplayQuery(
104
			$tables,
105
			$select,

includes/specials/SpecialWatchlist.php 1 location

@@ 254-260 (lines=7) @@
251
		}
252
253
		$rollbacker = $user->isAllowed( 'rollback' );
254
		if ( $usePage || $rollbacker ) {
255
			$tables[] = 'page';
256
			$join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
257
			if ( $rollbacker ) {
258
				$fields[] = 'page_latest';
259
			}
260
		}
261
262
		// Log entries with DELETED_ACTION must not show up unless the user has
263
		// the necessary rights.

includes/specials/SpecialRecentchanges.php 1 location

@@ 228-232 (lines=5) @@
225
			] ];
226
		}
227
228
		if ( $user->isAllowed( 'rollback' ) ) {
229
			$tables[] = 'page';
230
			$fields[] = 'page_latest';
231
			$join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
232
		}
233
234
		ChangeTags::modifyDisplayQuery(
235
			$tables,