| @@ 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' ], |
|
| @@ 162-167 (lines=6) @@ | ||
| 159 | $conds = array_merge( $userCond, $this->getNamespaceCond() ); |
|
| 160 | ||
| 161 | // Paranoia: avoid brute force searches (bug 17342) |
|
| 162 | if ( !$user->isAllowed( 'deletedhistory' ) ) { |
|
| 163 | $conds[] = $this->mDb->bitAnd( 'rev_deleted', Revision::DELETED_USER ) . ' = 0'; |
|
| 164 | } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { |
|
| 165 | $conds[] = $this->mDb->bitAnd( 'rev_deleted', Revision::SUPPRESSED_USER ) . |
|
| 166 | ' != ' . Revision::SUPPRESSED_USER; |
|
| 167 | } |
|
| 168 | ||
| 169 | # Don't include orphaned revisions |
|
| 170 | $join_cond['page'] = Revision::pageJoinCond(); |
|
| @@ 261-266 (lines=6) @@ | ||
| 258 | } |
|
| 259 | // Paranoia: avoid brute force searches (bug 17342) |
|
| 260 | $user = $this->getUser(); |
|
| 261 | if ( !$user->isAllowed( 'deletedhistory' ) ) { |
|
| 262 | $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION ) . ' = 0'; |
|
| 263 | } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { |
|
| 264 | $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::SUPPRESSED_ACTION ) . |
|
| 265 | ' != ' . LogPage::SUPPRESSED_ACTION; |
|
| 266 | } |
|
| 267 | } |
|
| 268 | ||
| 269 | /** |
|