X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2FTitle.php;h=3ce775b8bc80d95e94a786c4d3f41689e4878f15;hb=21f2b1e099c12e44083c3a6de0abd6561964ea6d;hp=5cf911f6384d6cca4717c2d5f50ba9e8c510cad4;hpb=5eaf2e1f15b03a3665d89176311c07d4c418e55d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/Title.php b/includes/Title.php index 5cf911f638..3ce775b8bc 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2417,7 +2417,7 @@ class Title implements LinkTarget { * * @param string $action The action to check * @param bool $short Short circuit on first error - * @return array List of errors + * @return array Array containing an error message key and any parameters */ private function missingPermissionError( $action, $short ) { // We avoid expensive display logic for quickUserCan's and such @@ -2425,19 +2425,7 @@ class Title implements LinkTarget { return [ 'badaccess-group0' ]; } - $groups = array_map( [ 'User', 'makeGroupLinkWiki' ], - User::getGroupsWithPermission( $action ) ); - - if ( count( $groups ) ) { - global $wgLang; - return [ - 'badaccess-groups', - $wgLang->commaList( $groups ), - count( $groups ) - ]; - } else { - return [ 'badaccess-group0' ]; - } + return User::newFatalPermissionDeniedStatus( $action )->getErrorsArray()[0]; } /**