Merge "Revert "Expose category totals in API response""

This commit is contained in:
jenkins-bot 2017-04-16 12:17:18 +00:00 committed by Gerrit Code Review
commit c9f45520f5

View file

@ -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(),
];
}
/**