Merge "Display error if Installer->execute() doesn't return a good status object"
[lhc/web/wiklou.git] / includes / specials / SpecialWatchlist.php
index 2443470..3d56330 100644 (file)
@@ -148,6 +148,7 @@ class SpecialWatchlist extends ChangesListSpecialPage {
 
        /**
         * @inheritDoc
+        * @suppress PhanUndeclaredMethod
         */
        protected function registerFilters() {
                parent::registerFilters();
@@ -382,7 +383,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;