Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -573,9 +573,12 @@ |
574 | 574 | but for now it won't pass anywhere behind the optimizer */ |
575 | 575 | $this->mConds[] = "NULL"; |
576 | 576 | } else { |
| 577 | + global $wgUser; |
577 | 578 | $this->mConds['log_user'] = $userid; |
578 | 579 | // Paranoia: avoid brute force searches (bug 17342) |
579 | | - $this->mConds[] = 'log_deleted & ' . LogPage::DELETED_USER . ' = 0'; |
| 580 | + if( !$wgUser->isAllowed( 'suppressrevision' ) ) { |
| 581 | + $this->mConds[] = 'log_deleted & ' . LogPage::DELETED_USER . ' = 0'; |
| 582 | + } |
580 | 583 | $this->user = $usertitle->getText(); |
581 | 584 | } |
582 | 585 | } |
— | — | @@ -587,7 +590,7 @@ |
588 | 591 | * @param $pattern String |
589 | 592 | */ |
590 | 593 | private function limitTitle( $page, $pattern ) { |
591 | | - global $wgMiserMode; |
| 594 | + global $wgMiserMode, $wgUser; |
592 | 595 | |
593 | 596 | $title = Title::newFromText( $page ); |
594 | 597 | if( strlen($page) == 0 || !$title instanceof Title ) |
— | — | @@ -617,7 +620,9 @@ |
618 | 621 | $this->mConds['log_title'] = $title->getDBkey(); |
619 | 622 | } |
620 | 623 | // Paranoia: avoid brute force searches (bug 17342) |
621 | | - $this->mConds[] = 'log_deleted & ' . LogPage::DELETED_ACTION . ' = 0'; |
| 624 | + if( !$wgUser->isAllowed( 'suppressrevision' ) ) { |
| 625 | + $this->mConds[] = 'log_deleted & ' . LogPage::DELETED_ACTION . ' = 0'; |
| 626 | + } |
622 | 627 | } |
623 | 628 | |
624 | 629 | public function getQueryInfo() { |
— | — | @@ -639,7 +644,8 @@ |
640 | 645 | 'join_conds' => array( 'user' => array( 'INNER JOIN', 'user_id=log_user' ) ), |
641 | 646 | ); |
642 | 647 | |
643 | | - ChangeTags::modifyDisplayQuery( $info['tables'], $info['fields'], $info['conds'], $info['join_conds'], $this->mTagFilter ); |
| 648 | + ChangeTags::modifyDisplayQuery( $info['tables'], $info['fields'], $info['conds'], |
| 649 | + $info['join_conds'], $this->mTagFilter ); |
644 | 650 | |
645 | 651 | return $info; |
646 | 652 | } |
Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -390,11 +390,14 @@ |
391 | 391 | } |
392 | 392 | |
393 | 393 | function getQueryInfo() { |
| 394 | + global $wgUser; |
394 | 395 | list( $tables, $index, $userCond, $join_cond ) = $this->getUserCond(); |
395 | 396 | |
396 | 397 | $conds = array_merge( $userCond, $this->getNamespaceCond() ); |
397 | | - // Paranoia: avoid brute force searches (bug 17792) |
398 | | - $conds[] = 'rev_deleted & ' . Revision::DELETED_USER . ' = 0'; |
| 398 | + // Paranoia: avoid brute force searches (bug 17342) |
| 399 | + if( !$wgUser->isAllowed( 'suppressrevision' ) ) { |
| 400 | + $conds[] = 'rev_deleted & ' . Revision::DELETED_USER . ' = 0'; |
| 401 | + } |
399 | 402 | $join_cond['page'] = array( 'INNER JOIN', 'page_id=rev_page' ); |
400 | 403 | |
401 | 404 | $queryInfo = array( |