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

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