X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryAllUsers.php;h=e0513e22d60c1e889ac41aa3a20e3352eb9fd2e3;hb=8cd4986f24780107e1daff69dc27315e6dcc12e3;hp=161cfb44d0fd2a565e6679301c7e468141cc79a9;hpb=63591baccce89e34dddb6a6b227f4e024111327b;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryAllUsers.php b/includes/api/ApiQueryAllUsers.php index 161cfb44d0..e0513e22d6 100644 --- a/includes/api/ApiQueryAllUsers.php +++ b/includes/api/ApiQueryAllUsers.php @@ -90,7 +90,8 @@ class ApiQueryAllUsers extends ApiQueryBase { if ( !is_null( $params['rights'] ) && count( $params['rights'] ) ) { $groups = []; foreach ( $params['rights'] as $r ) { - $groups = array_merge( $groups, User::getGroupsWithPermission( $r ) ); + $groups = array_merge( $groups, $this->getPermissionManager() + ->getGroupsWithPermission( $r ) ); } // no group with the given right(s) exists, no need for a query @@ -312,7 +313,7 @@ class ApiQueryAllUsers extends ApiQueryBase { } if ( $fld_rights ) { - $data['rights'] = User::getGroupPermissions( $groups ); + $data['rights'] = $this->getPermissionManager()->getGroupPermissions( $groups ); ApiResult::setIndexedTagName( $data['rights'], 'r' ); ApiResult::setArrayType( $data['rights'], 'array' ); } @@ -355,7 +356,7 @@ class ApiQueryAllUsers extends ApiQueryBase { ApiBase::PARAM_ISMULTI => true, ], 'rights' => [ - ApiBase::PARAM_TYPE => User::getAllRights(), + ApiBase::PARAM_TYPE => $this->getPermissionManager()->getAllPermissions(), ApiBase::PARAM_ISMULTI => true, ], 'prop' => [ @@ -393,7 +394,7 @@ class ApiQueryAllUsers extends ApiQueryBase { protected function getExamplesMessages() { return [ 'action=query&list=allusers&aufrom=Y' - => 'apihelp-query+allusers-example-Y', + => 'apihelp-query+allusers-example-y', ]; }