From: Andrew Garrett Date: Thu, 24 Apr 2008 08:58:39 +0000 (+0000) Subject: Also, include includes when committing changes (haw haw) X-Git-Tag: 1.31.0-rc.0~48105 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=b960ecccdabd2f3025573f8423e9a5799189818f;p=lhc%2Fweb%2Fwiklou.git Also, include includes when committing changes (haw haw) --- 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; + } }