From 7ee55f6682afcbb1de2969f7bfb191c3c19f2873 Mon Sep 17 00:00:00 2001 From: latham <latham@ispconfig3> Date: Thu, 19 May 2011 14:02:46 -0400 Subject: [PATCH] Various Fixes. Add missing function for email quota --- server/mods-available/monitor_core_module.inc.php | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/server/mods-available/monitor_core_module.inc.php b/server/mods-available/monitor_core_module.inc.php index 185702a..a0410c8 100644 --- a/server/mods-available/monitor_core_module.inc.php +++ b/server/mods-available/monitor_core_module.inc.php @@ -86,7 +86,7 @@ /* * Calls the single Monitoring steps */ - //* $this->_monitorEmailQuota(); in process +// $this->_monitorEmailQuota(); $this->_monitorHDQuota(); $this->_monitorServer(); $this->_monitorOsVer(); @@ -115,6 +115,31 @@ $this->_monitorSysLog(); } + private function _monitorEmailQuota() { + global $app; + + /* + * First we get the Monitoring-data from the tools + */ + $res = $this->_tools->monitorEmailQuota(); + + /* + * Insert the data into the database + */ + $sql = 'INSERT INTO monitor_data (server_id, type, created, data, state) ' . + 'VALUES (' . + $res['server_id'] . ', ' . + "'" . $app->dbmaster->quote($res['type']) . "', " . + 'UNIX_TIMESTAMP(), ' . + "'" . $app->dbmaster->quote(serialize($res['data'])) . "', " . + "'" . $res['state'] . "'" . + ')'; + $app->dbmaster->query($sql); + + /* The new data is written, now we can delete the old one */ + $this->_delOldRecords($res['type'], $res['server_id']); + } + private function _monitorHDQuota() { global $app; -- Gitblit v1.9.1