Merge "Use IDatabase::buildStringCast in Special:MediaStatistics"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index 56f5c8f..f5239b4 100644 (file)
@@ -382,7 +382,10 @@ class SpecialWatchlist extends ChangesListSpecialPage {
                // the necessary rights.
                if ( !$user->isAllowed( 'deletedhistory' ) ) {
                        $bitmask = LogPage::DELETED_ACTION;
-               } elseif ( !$user->isAllowedAny( 'suppressrevision', 'viewsuppressed' ) ) {
+               } elseif ( !MediaWikiServices::getInstance()
+                       ->getPermissionManager()
+                       ->userHasAnyRight( $user, 'suppressrevision', 'viewsuppressed' )
+               ) {
                        $bitmask = LogPage::DELETED_ACTION | LogPage::DELETED_RESTRICTED;
                } else {
                        $bitmask = 0;
@@ -880,7 +883,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
        private function getLatestNotificationTimestamp( RecentChange $rc ) {
                return $this->watchStore->getLatestNotificationTimestamp(
                        $rc->getAttribute( 'wl_notificationtimestamp' ),
-                       $rc->getPerformer(),
+                       $this->getUser(),
                        $rc->getTitle()
                );
        }