Florian Schaal
2015-08-26 4f5942fdf77883a7d720419e884776e36e6b3b4c
server/lib/classes/monitor_tools.inc.php
@@ -666,7 +666,7 @@
      // $now = time();
      // $old = $now - (4 * 60); // 4 minutes
      $old = 'UNIX_TIMESTAMP() - 240';
      $old = 240; //seconds
      /*
       * ATTENTION if i do NOT pay attention of the server id, i delete all data (of the type)
@@ -676,13 +676,7 @@
       * even though it is the NEWEST data of this server. To avoid this i HAVE to include
       * the server-id!
       */
      $sql = 'DELETE FROM monitor_data ' .
         'WHERE ' .
         '  type = ?' .
         'AND ' .
         '  created < ? ' .
         'AND ' .
         '  server_id = ?';
      $sql = 'DELETE FROM `monitor_data` WHERE `type` = ? AND `created` < UNIX_TIMESTAMP() - ? AND `server_id` = ?';
      $app->dbmaster->query($sql, $type, $old, $serverId);
   }