tbrehm
2013-07-31 615a0a96618fa99e7e452523145d6c0f238d4473
server/mods-available/monitor_core_module.inc.php
@@ -37,6 +37,8 @@
   var $actions_available = array();
   /** The Tools */
   private $_tools = null;
    //** time the script was called
    private $_run_time = null;
   /**
    * This function is called during ispconfig installation to determine
@@ -52,11 +54,14 @@
    */
   public function onLoad() {
      global $app;
        //* store the running time
        $this->_run_time = time();
      /*
       * Do the monitor every n minutes and write the result to the db
       */
      $min = @date('i');
      $min = @date('i', $this->_run_time);
      if (($min % $this->interval) == 0) {
         $this->_doMonitor();
      }
@@ -122,7 +127,7 @@
        /*
       *  This monitoring is expensive, so do it only every 15 minutes
       */
      $min = @date('i');
      $min = @date('i', $this->_run_time);
      if ($min % 15 != 0) return;
      
      $app->uses('getconf');
@@ -404,7 +409,7 @@
      /*
       *  This monitoring is expensive, so do it only once an hour
       */
      $min = @date('i');
      $min = @date('i', $this->_run_time);
      if ($min != 0)
         return;
@@ -419,7 +424,8 @@
      $res = $this->_tools->monitorSystemUpdate();
      
      //* Ensure that output is encoded so that it does not break the serialize
      $res['data']['output'] = htmlentities($res['data']['output']);
      //$res['data']['output'] = htmlentities($res['data']['output']);
      $res['data']['output'] = htmlentities($res['data']['output'],ENT_QUOTES,'UTF-8');
      /*
       * Insert the data into the database
@@ -492,8 +498,8 @@
      /*
       *  This monitoring is expensive, so do it only once a day
       */
      $min = @date('i');
      $hour = @date('H');
      $min = @date('i', $this->_run_time);
      $hour = @date('H', $this->_run_time);
      if (!($min == 0 && $hour == 23))
         return;
      /*