Merge "Use isDisabled() instead of isBlank() in getGrantName in User.php"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Tue, 29 Nov 2016 23:03:55 +0000 (23:03 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Tue, 29 Nov 2016 23:03:55 +0000 (23:03 +0000)
1  2 
includes/user/User.php

@@@ -5072,22 -5073,9 +5073,22 @@@ class User implements IDBAccessObject 
        public static function getRightDescription( $right ) {
                $key = "right-$right";
                $msg = wfMessage( $key );
-               return $msg->isBlank() ? $right : $msg->text();
+               return $msg->isDisabled() ? $right : $msg->text();
        }
  
 +      /**
 +       * Get the name of a given grant
 +       *
 +       * @since 1.29
 +       * @param string $grant Grant to query
 +       * @return string Localized name of the grant
 +       */
 +      public static function getGrantName( $grant ) {
 +              $key = "grant-$grant";
 +              $msg = wfMessage( $key );
 +              return $msg->isDisabled() ? $grant : $msg->text();
 +      }
 +
        /**
         * Make a new-style password hash
         *