mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Linter
synced 2024-11-27 17:20:12 +00:00
Merge "Revert "Expose category totals in API response""
This commit is contained in:
commit
c9f45520f5
|
@ -97,15 +97,10 @@ class Hooks {
|
|||
*/
|
||||
public static function onAPIQuerySiteInfoGeneralInfo( ApiQuerySiteInfo $api, array &$data ) {
|
||||
$catManager = new CategoryManager();
|
||||
$totals = ( new Database( 0 ) )->getTotals();
|
||||
$info = [];
|
||||
foreach ( $catManager->getErrors() as $error ) {
|
||||
$info['errors'][$error] = $totals[$error];
|
||||
}
|
||||
foreach ( $catManager->getWarnings() as $warning ) {
|
||||
$info['warnings'][$warning] = $totals[$warning];
|
||||
}
|
||||
$data['linter'] = $info;
|
||||
$data['linter'] = [
|
||||
'errors' => $catManager->getErrors(),
|
||||
'warnings' => $catManager->getWarnings(),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue