From c95f8cd52971b57351a34da03b00e03a032822d6 Mon Sep 17 00:00:00 2001 From: vogelor Date: Fri, 12 Dec 2008 13:02:57 +0000 Subject: [PATCH] fixed a bug in replication --- server/lib/classes/modules.inc.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/server/lib/classes/modules.inc.php b/server/lib/classes/modules.inc.php index 542ebef83f..4ba22128fa 100644 --- a/server/lib/classes/modules.inc.php +++ b/server/lib/classes/modules.inc.php @@ -82,7 +82,6 @@ class modules { function processDatalog() { global $app,$conf; - // TODO: process only new entries. //* If its a multiserver setup if($app->db->dbHost != $app->dbmaster->dbHost) { $sql = "SELECT * FROM sys_datalog WHERE datalog_id > ".$conf['last_datalog_id']." AND (server_id = ".$conf["server_id"]." OR server_id = 0) ORDER BY datalog_id"; @@ -151,7 +150,12 @@ class modules { $app->dbmaster->query("UPDATE server SET updated = ".$d["datalog_id"]." WHERE server_id = ".$conf["server_id"]); $app->log("Processed datalog_id ".$d["datalog_id"],LOGLEVEL_DEBUG); } else { - $app->log("Error in Repliction, changes were not processed.",LOGLEVEL_ERROR); + $app->log("Error in Replication, changes were not processed.",LOGLEVEL_ERROR); + /* + * If there is any error in processing the datalog we can't continue, because + * we do not know if the newer actions require this (old) one. + */ + return; } } -- GitLab