X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Flogging%2FLogPager.php;h=3583599bd0432176bab0f54de7d777903bb9587c;hb=10783e29e4f2adc6fef6d3584c6306dc98029996;hp=c4ce7b3e9e318eaab1262672a719abcfd3430b24;hpb=e00d638bb1ac6db8087772038516c96405737f77;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php index c4ce7b3e9e..3583599bd0 100644 --- a/includes/logging/LogPager.php +++ b/includes/logging/LogPager.php @@ -218,17 +218,19 @@ class LogPager extends ReverseChronologicalPager { } } - # Using the (log_namespace, log_title, log_timestamp) index with a - # range scan (LIKE) on the first two parts, instead of simple equality, - # makes it unusable for sorting. Sorted retrieval using another index - # would be possible, but then we might have to scan arbitrarily many - # nodes of that index. Therefore, we need to avoid this if $wgMiserMode - # is on. - # - # This is not a problem with simple title matches, because then we can - # use the page_time index. That should have no more than a few hundred - # log entries for even the busiest pages, so it can be safely scanned - # in full to satisfy an impossible condition on user or similar. + /** + * Using the (log_namespace, log_title, log_timestamp) index with a + * range scan (LIKE) on the first two parts, instead of simple equality, + * makes it unusable for sorting. Sorted retrieval using another index + * would be possible, but then we might have to scan arbitrarily many + * nodes of that index. Therefore, we need to avoid this if $wgMiserMode + * is on. + * + * This is not a problem with simple title matches, because then we can + * use the page_time index. That should have no more than a few hundred + * log entries for even the busiest pages, so it can be safely scanned + * in full to satisfy an impossible condition on user or similar. + */ $this->mConds['log_namespace'] = $ns; if ( $doUserRightsLogLike ) { $params = array( $name . $wgUserrightsInterwikiDelimiter ); @@ -248,7 +250,7 @@ class LogPager extends ReverseChronologicalPager { $user = $this->getUser(); if ( !$user->isAllowed( 'deletedhistory' ) ) { $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::DELETED_ACTION ) . ' = 0'; - } elseif ( !$user->isAllowed( 'suppressrevision' ) ) { + } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) { $this->mConds[] = $db->bitAnd( 'log_deleted', LogPage::SUPPRESSED_ACTION ) . ' != ' . LogPage::SUPPRESSED_ACTION; }