From: jenkins-bot Date: Tue, 29 Nov 2016 23:03:55 +0000 (+0000) Subject: Merge "Use isDisabled() instead of isBlank() in getGrantName in User.php" X-Git-Tag: 1.31.0-rc.0~4734 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=bfcbf215f7a60f830f6e5ecb66fcfb3e6bf4286e;p=lhc%2Fweb%2Fwiklou.git Merge "Use isDisabled() instead of isBlank() in getGrantName in User.php" --- bfcbf215f7a60f830f6e5ecb66fcfb3e6bf4286e diff --cc includes/user/User.php index b6a64b0412,4950e27e72..f07db0e1b7 --- a/includes/user/User.php +++ b/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 *