Fix up r43673: reindex the rights array after removing duplicates

This commit is contained in:
Roan Kattouw 2008-11-20 15:15:00 +00:00
parent c3be8a3034
commit a6e101025d

View file

@ -77,7 +77,7 @@ class ApiQueryUserInfo extends ApiQueryBase {
}
if (isset($this->prop['rights'])) {
// User::getRights() may return duplicate values, strip them
$vals['rights'] = array_unique($wgUser->getRights());
$vals['rights'] = array_values(array_unique($wgUser->getRights()));
$result->setIndexedTagName($vals['rights'], 'r'); // even if empty
}
if (isset($this->prop['options'])) {