diff --git a/library/Director/Db/Housekeeping.php b/library/Director/Db/Housekeeping.php index 1b6677b2..2bc7d1d0 100644 --- a/library/Director/Db/Housekeeping.php +++ b/library/Director/Db/Housekeeping.php @@ -30,19 +30,25 @@ class Housekeeping public function getTaskSummary() { return array( - 'oldUndeployedConfigs' => array( + 'oldUndeployedConfigs' => (object) array( 'title' => N_('Undeployed configurations'), 'count' => $this->countOldUndeployedConfigs() ), - 'unusedFiles' => array( + 'unusedFiles' => (object) array( 'title' => N_('Unused rendered files'), 'count' => $this->countUnusedFiles() ) ); } - public function getPendingTasks() + public function getPendingTaskSummary() { + return array_filter( + $this->getTaskSummary(), + function($task) { + return $task->count > 0; + } + ); } public function countOldUndeployedConfigs()