From b960ecccdabd2f3025573f8423e9a5799189818f Mon Sep 17 00:00:00 2001 From: Andrew Garrett Date: Thu, 24 Apr 2008 08:58:39 +0000 Subject: [PATCH] Also, include includes when committing changes (haw haw) --- includes/SpecialListgrouprights.php | 4 ++-- includes/User.php | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/includes/SpecialListgrouprights.php b/includes/SpecialListgrouprights.php index 389824aa4c..9eb78d8cb3 100644 --- a/includes/SpecialListgrouprights.php +++ b/includes/SpecialListgrouprights.php @@ -95,8 +95,8 @@ class SpecialListGroupRights extends SpecialPage { $r = array(); foreach( $permissions as $permission => $granted ) { if ( $granted ) { - $permission = htmlspecialchars( $permission ); - $r[] = wfMsgExt( 'listgrouprights-link', array( 'parseinline', 'content' ), $permission ); + $description = User::getRightDescription($permission); + $r[] = wfMsgExt( 'listgrouprights-link', array( 'parseinline', 'content' ), $description, $permission ); } } sort( $r ); diff --git a/includes/User.php b/includes/User.php index 7897c3c173..66d07b0863 100644 --- a/includes/User.php +++ b/includes/User.php @@ -2825,4 +2825,14 @@ class User { // edit count in user cache too $this->invalidateCache(); } + + static function getRightDescription( $right ) { + global $wgMessageCache; + $wgMessageCache->loadAllMessages(); + $key = "right-$right"; + $name = wfMsg( $key ); + return $name == '' || wfEmptyMsg( $key, $name ) + ? $right + : $name; + } } -- 2.20.1