X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fapi%2FApiQueryContributors.php;h=f2e306fe8352831e68d2952e1ac4b9803614610e;hb=23707d999dc0d225ede7a2a9dc9639300423042a;hp=fd2d199b807b1c163a793f242e93c92d4619dffb;hpb=8e158c68bc43106caec2c1d5aa8c656dab568818;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/api/ApiQueryContributors.php b/includes/api/ApiQueryContributors.php index fd2d199b80..f2e306fe83 100644 --- a/includes/api/ApiQueryContributors.php +++ b/includes/api/ApiQueryContributors.php @@ -46,8 +46,6 @@ class ApiQueryContributors extends ApiQueryBase { } public function execute() { - global $wgActorTableSchemaMigrationStage; - $db = $this->getDB(); $params = $this->extractRequestParams(); $this->requireMaxOneParameter( $params, 'group', 'excludegroup', 'rights', 'excluderights' ); @@ -80,14 +78,10 @@ class ApiQueryContributors extends ApiQueryBase { $result = $this->getResult(); $revQuery = MediaWikiServices::getInstance()->getRevisionStore()->getQueryInfo(); - // For SCHEMA_COMPAT_READ_NEW, target indexes on the - // revision_actor_temp table, otherwise on the revision table. - $pageField = ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) - ? 'revactor_page' : 'rev_page'; - $idField = ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) - ? 'revactor_actor' : $revQuery['fields']['rev_user']; - $countField = ( $wgActorTableSchemaMigrationStage & SCHEMA_COMPAT_READ_NEW ) - ? 'revactor_actor' : $revQuery['fields']['rev_user_text']; + // Target indexes on the revision_actor_temp table. + $pageField = 'revactor_page'; + $idField = 'revactor_actor'; + $countField = 'revactor_actor'; // First, count anons $this->addTables( $revQuery['tables'] ); @@ -231,7 +225,7 @@ class ApiQueryContributors extends ApiQueryBase { public function getAllowedParams() { $userGroups = User::getAllGroups(); - $userRights = User::getAllRights(); + $userRights = $this->getPermissionManager()->getAllPermissions(); return [ 'group' => [