From cab7ea5faaa2f3510c8488e7d19d083fc05ac6ca Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Wed, 18 Sep 2013 04:17:27 -0400
Subject: [PATCH] - Fixed missing global $app in new _decode function
---
server/server.php | 23 ++++++++++++++++++++---
1 files changed, 20 insertions(+), 3 deletions(-)
diff --git a/server/server.php b/server/server.php
index be710ee..2ead490 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
@@ -56,9 +62,20 @@
// Set the loglevel
$conf['log_priority'] = intval($conf['serverconfig']['server']['loglevel']);
+
+ // Set level from which admin should be notified by email
+ if(!isset($conf['serverconfig']['server']['admin_notify_events']) || $conf['serverconfig']['server']['admin_notify_events'] == '') $conf['serverconfig']['server']['admin_notify_events'] = 3;
+ $conf['admin_notify_priority'] = intval($conf['serverconfig']['server']['admin_notify_events']);
// we do not need this variable anymore
unset($server_db_record);
+
+ // retrieve admin email address for notifications
+ //$sys_ini = $app->dbmaster->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1");
+ $sys_ini = $app->db->queryOneRecord("SELECT * FROM sys_ini WHERE sysini_id = 1");
+ $conf['sys_ini'] = $app->ini_parser->parse_ini_string(stripslashes($sys_ini['config']));
+ $conf['admin_mail'] = $conf['sys_ini']['mail']['admin_mail'];
+ unset($sys_ini);
/*
* Save the rescue-config, maybe we need it (because the database is down)
@@ -190,8 +207,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