From 6b3bfc2fbf53e079e64614cdca608d84326be868 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 27 Mar 2013 07:18:30 -0400
Subject: [PATCH] Fixed: FS#2836 - Upgrade from 3.0.4.x to 3.0.5 will break ispconfig setup if php-process module is missing.
---
server/server.php | 18 +++++++++++++-----
1 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/server/server.php b/server/server.php
index 3683f19..d728283 100644
--- a/server/server.php
+++ b/server/server.php
@@ -42,8 +42,16 @@
*/
if ($app->dbmaster->connect_error == NULL) {
$server_db_record = $app->dbmaster->queryOneRecord("SELECT * FROM server WHERE server_id = " . $conf['server_id']);
-
- $conf['last_datalog_id'] = (int) $server_db_record['updated'];
+
+ if(!is_array($server_db_record)) die('Unable to load the server configuration from database.');
+
+ //* 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
@@ -146,7 +154,7 @@
unset($tmp_rec);
//** Load required base-classes
- $app->uses('modules,plugins,file,services');
+ $app->uses('modules,plugins,file,services,system');
//** Load the modules that are in the mods-enabled folder
$app->modules->loadModules('all');
//** Load the plugins that are in the plugins-enabled folder
@@ -185,8 +193,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