'noratelimit',
'override-export-depth',
'pagelang',
- 'passwordreset',
'patrol',
'patrolmarks',
'protect',
// If the block is not valid, clear the block cookie (but don't delete it,
// because it needs to be cleared from LocalStorage as well and an empty string
// value is checked for in the mediawiki.user.blockcookie module).
- $block->setCookie( $this->getRequest()->response(), true );
+ $tmpBlock->setCookie( $this->getRequest()->response(), true );
}
}
}
/**
* 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();
+ }
+
+ /**
+ * 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();
}
/**