Use varargs for MessageLocalizer::msg and similar
[lhc/web/wiklou.git] / includes / logging / LogFormatter.php
index 9e63ffe..4aa890f 100644 (file)
@@ -163,7 +163,9 @@ class LogFormatter {
                $logRestrictions = $this->context->getConfig()->get( 'LogRestrictions' );
                $type = $this->entry->getType();
                return !isset( $logRestrictions[$type] )
-                       || $this->context->getUser()->isAllowed( $logRestrictions[$type] );
+                       || MediaWikiServices::getInstance()
+                                  ->getPermissionManager()
+                                  ->userHasRight( $this->context->getUser(), $logRestrictions[$type] );
        }
 
        /**
@@ -753,10 +755,11 @@ class LogFormatter {
        /**
         * Shortcut for wfMessage which honors local context.
         * @param string $key
+        * @param mixed ...$params
         * @return Message
         */
-       protected function msg( $key ) {
-               return $this->context->msg( $key );
+       protected function msg( $key, ...$params ) {
+               return $this->context->msg( $key, ...$params );
        }
 
        /**