moglia
2010-05-16 bef47735b2cc8d484a9533a726f1c7a6c42b3f6c
server/cron_daily.php
@@ -221,7 +221,21 @@
    * if they are NOT ok, the server will try to process them in 1 minute and so the
    * error appears again after 1 minute. So it is no problem to delete the old one!
    */
   $sql = "DELETE FROM sys_log WHERE tstamp < $tstamp AND server_id != 0";
   $sql = "DELETE FROM sys_log WHERE tstamp < " . $tstamp . " AND server_id != 0";
   $app->dbmaster->query($sql);
   /*
    * Delete all remote-actions "done" and older than 7 days
    * ATTENTION: We have the same problem as described in cleaning the datalog. We must not
    * delete the last entry
    */
   $sql = "SELECT max(action_id) FROM sys_remoteaction";
   $res = $app->dbmaster->queryOneRecord($sql);
   $maxId = $res['max(action_id)'];
   $sql =  "DELETE FROM sys_remoteaction " .
         "WHERE tstamp < " . $tstamp . " " .
         " AND action_status = 'ok' " .
         " AND action_id <" . intval($maxId);
   $app->dbmaster->query($sql);
   /*