summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialWatchlist.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2014-01-14 19:24:18 +0100
committerPierre Schmitz <pierre@archlinux.de>2014-01-14 19:24:18 +0100
commit224b22a051051f6c2e494c3a2fb4adb42898e2d1 (patch)
tree85a41a4cf8533bf740ec4c8d3affce88414daa56 /includes/specials/SpecialWatchlist.php
parent9937b8e6d6a8b4517c04c143daaf9ebd42ce8ba0 (diff)
Update to MediaWiki 1.22.1
Diffstat (limited to 'includes/specials/SpecialWatchlist.php')
-rw-r--r--includes/specials/SpecialWatchlist.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php
index 4afa279e..55dc6efd 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -299,6 +299,22 @@ class SpecialWatchlist extends SpecialPage {
}
}
+ // Log entries with DELETED_ACTION must not show up unless the user has
+ // the necessary rights.
+ if ( !$user->isAllowed( 'deletedhistory' ) ) {
+ $bitmask = LogPage::DELETED_ACTION;
+ } elseif ( !$user->isAllowed( 'suppressrevision' ) ) {
+ $bitmask = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED;
+ } else {
+ $bitmask = 0;
+ }
+ if ( $bitmask ) {
+ $conds[] = $dbr->makeList( array(
+ 'rc_type != ' . RC_LOG,
+ $dbr->bitAnd( 'rc_deleted', $bitmask ) . " != $bitmask",
+ ), LIST_OR );
+ }
+
ChangeTags::modifyDisplayQuery( $tables, $fields, $conds, $join_conds, $options, '' );
wfRunHooks( 'SpecialWatchlistQuery', array( &$conds, &$tables, &$join_conds, &$fields, $values ) );