From e5f4d29bd7b15c9428245bebc28c69da8c788b8d Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Mon, 20 Aug 2007 11:22:31 -0400
Subject: [PATCH] Added a deprecated warning in the interface/sql/ directory. The database sql dump in this directory is not the current development release and the directory will be removed as the installation related code is now located in the install/ tree. The current sql file is available in install/sql/

---
 server/lib/classes/modules.inc.php |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php
index a8de65b..41bc2ae 100644
--- a/server/lib/classes/modules.inc.php
+++ b/server/lib/classes/modules.inc.php
@@ -78,14 +78,16 @@
 	*/
 	
 	function processDatalog() {
-		global $app;
+		global $app,$conf;
 		
 		// TODO: process only new entries.
-		$sql = "SELECT * FROM sys_datalog WHERE 1";
+		$sql = "SELECT * FROM sys_datalog WHERE server_id = ".$conf["server_id"]." ORDER BY datalog_id";
 		$records = $app->db->queryAllRecords($sql);
 		foreach($records as $rec) {
 			$data = unserialize(stripslashes($rec["data"]));
 			$this->raiseTableHook($rec["dbtable"],$rec["action"],$data);
+			$app->db->query("DELETE FROM sys_datalog WHERE datalog_id = ".$rec["datalog_id"]);
+			$app->log("Deleting sys_datalog ID ".$rec["datalog_id"],LOGLEVEL_DEBUG);
 		}
 	}
 	

--
Gitblit v1.9.1