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/SpecialRecentchanges.php 1 location

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

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.