From 3f478f7b37eb314c7dba33af10e8d32d5f2fa579 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 19 Apr 2013 05:35:57 -0400
Subject: [PATCH] Merged revisions 3922-3958 from stable branch.

---
 server/server.php |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/server/server.php b/server/server.php
index be710ee..1cdcb85 100644
--- a/server/server.php
+++ b/server/server.php
@@ -45,7 +45,13 @@
 	
 	if(!is_array($server_db_record)) die('Unable to load the server configuration from database.');
 	
-	$conf['last_datalog_id'] = (int) $server_db_record['updated'];
+	//* Get the number of the last processed datalog_id, if the id of the local server 
+	//* is > then the one of the remote system, then use the local ID as we might not have
+	//* reached the remote server during the last run then.
+	$local_server_db_record = $app->db->queryOneRecord("SELECT * FROM server WHERE server_id = " . $conf['server_id']);
+	$conf['last_datalog_id'] = (int) max($server_db_record['updated'],$local_server_db_record['updated']);
+	unset($local_server_db_record);
+	
 	$conf['mirror_server_id'] = (int) $server_db_record['mirror_server_id'];
 
 	// Load the ini_parser
@@ -190,8 +196,8 @@
 	$app->uses('modules,plugins,file,services');
 	// Load the modules that are im the mods-core folder
 	$app->modules->loadModules('core');
-	// Load the plugins that are in the plugins-core folder
-	$app->plugins->loadPlugins('core');
+	// Load the plugins that are in the f folder
+	//$app->plugins->loadPlugins('core');
 }
 
 

--
Gitblit v1.9.1