Code Duplication    Length = 9-10 lines in 2 locations

includes/specials/SpecialRecentchangeslinked.php 1 location

@@ 89-97 (lines=9) @@
86
87
		// left join with watchlist table to highlight watched rows
88
		$uid = $this->getUser()->getId();
89
		if ( $uid && $this->getUser()->isAllowed( 'viewmywatchlist' ) ) {
90
			$tables[] = 'watchlist';
91
			$select[] = 'wl_user';
92
			$join_conds['watchlist'] = [ 'LEFT JOIN', [
93
				'wl_user' => $uid,
94
				'wl_title=rc_title',
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' ];

includes/specials/SpecialRecentchanges.php 1 location

@@ 214-223 (lines=10) @@
211
		$join_conds = [];
212
213
		// JOIN on watchlist for users
214
		if ( $user->getId() && $user->isAllowed( 'viewmywatchlist' ) ) {
215
			$tables[] = 'watchlist';
216
			$fields[] = 'wl_user';
217
			$fields[] = 'wl_notificationtimestamp';
218
			$join_conds['watchlist'] = [ 'LEFT JOIN', [
219
				'wl_user' => $user->getId(),
220
				'wl_title=rc_title',
221
				'wl_namespace=rc_namespace'
222
			] ];
223
		}
224
225
		if ( $user->isAllowed( 'rollback' ) ) {
226
			$tables[] = 'page';