Code Duplication    Length = 6-6 lines in 3 locations

includes/specials/pagers/ContribsPager.php 1 location

@@ 161-166 (lines=6) @@
158
		$conds = array_merge( $userCond, $this->getNamespaceCond() );
159
160
		// Paranoia: avoid brute force searches (bug 17342)
161
		if ( !$user->isAllowed( 'deletedhistory' ) ) {
162
			$conds[] = $this->mDb->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0';
163
		} elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
164
			$conds[] = $this->mDb->bitAnd( 'rev_deleted', Revision::SUPPRESSED_USER ) .
165
				' != ' . Revision::SUPPRESSED_USER;
166
		}
167
168
		# Don't include orphaned revisions
169
		$join_cond['page'] = Revision::pageJoinCond();

includes/specials/pagers/DeletedContribsPager.php 1 location

@@ 61-66 (lines=6) @@
58
		$conds = array_merge( $userCond, $this->getNamespaceCond() );
59
		$user = $this->getUser();
60
		// Paranoia: avoid brute force searches (bug 17792)
61
		if ( !$user->isAllowed( 'deletedhistory' ) ) {
62
			$conds[] = $this->mDb->bitAnd( 'ar_deleted', Revision::DELETED_USER ) . ' = 0';
63
		} elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
64
			$conds[] = $this->mDb->bitAnd( 'ar_deleted', Revision::SUPPRESSED_USER ) .
65
				' != ' . Revision::SUPPRESSED_USER;
66
		}
67
68
		return [
69
			'tables' => [ 'archive' ],

includes/logging/LogPager.php 1 location

@@ 258-263 (lines=6) @@
255
		}
256
		// Paranoia: avoid brute force searches (bug 17342)
257
		$user = $this->getUser();
258
		if ( !$user->isAllowed( 'deletedhistory' ) ) {
259
			$this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION ) . ' = 0';
260
		} elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
261
			$this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::SUPPRESSED_ACTION ) .
262
				' != ' . LogPage::SUPPRESSED_ACTION;
263
		}
264
	}
265
266
	/**