Follow-up to r54016: deletedcontribs
authorAaron Schulz <aaron@users.mediawiki.org>
Thu, 30 Jul 2009 17:11:18 +0000 (17:11 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Thu, 30 Jul 2009 17:11:18 +0000 (17:11 +0000)
includes/specials/SpecialDeletedContributions.php

index 4afa30d..53466a9 100644 (file)
@@ -30,8 +30,11 @@ class DeletedContribsPager extends IndexPager {
                list( $index, $userCond ) = $this->getUserCond();
                $conds = array_merge( $userCond, $this->getNamespaceCond() );
                // Paranoia: avoid brute force searches (bug 17792)
-               if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
-                       $conds[] = $this->mDb->bitAnd('ar_deleted', Revision::DELETED_USER) . ' = 0';
+               if( !$wgUser->isAllowed( 'deleterevision' ) ) {
+                       $conds[] = $this->mDb->bitAnd('ar_deleted',Revision::DELETED_USER) . ' = 0';
+               } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
+                       $conds[] = $this->mDb->bitAnd('ar_deleted',Revision::SUPPRESSED_USER) .
+                               ' != ' . Revision::SUPPRESSED_USER;
                }
                return array(
                        'tables' => array( 'archive' ),
@@ -425,4 +428,4 @@ class DeletedContributionsPage extends SpecialPage {
                        Xml::closeElement( 'form' );
                return $f;
        }
-}
+}
\ No newline at end of file