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)
includes/user/User.php

index b6a64b0..f07db0e 100644 (file)
@@ -5066,13 +5066,14 @@ class User implements IDBAccessObject {
        /**
         * Get the description of a given right
         *
+        * @since 1.29
         * @param string $right Right to query
         * @return string Localized description of the right
         */
        public static function getRightDescription( $right ) {
                $key = "right-$right";
                $msg = wfMessage( $key );
-               return $msg->isBlank() ? $right : $msg->text();
+               return $msg->isDisabled() ? $right : $msg->text();
        }
 
        /**