From d8faa4e7e3fb74e554f6c9339f6fe4e2883c3bf1 Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Fri, 18 Sep 2015 13:43:03 -0400
Subject: [PATCH] Fix by dirkd: Since file() doesn't remove "\n" from the lines read the condition $lines[$l] == '' never evaluated to true. So $mailHeaders would always contain every line from the template while $mailBody contained none of them.
---
server/lib/classes/getconf.inc.php | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/server/lib/classes/getconf.inc.php b/server/lib/classes/getconf.inc.php
index c5ca6c6..2c20971 100644
--- a/server/lib/classes/getconf.inc.php
+++ b/server/lib/classes/getconf.inc.php
@@ -38,7 +38,7 @@
if(!is_array($this->config[$server_id])) {
$app->uses('ini_parser');
$server_id = intval($server_id);
- $server = $app->db->queryOneRecord('SELECT config FROM server WHERE server_id = '.$server_id);
+ $server = $app->db->queryOneRecord('SELECT config FROM server WHERE server_id = ?', $server_id);
$this->config[$server_id] = $app->ini_parser->parse_ini_string(stripslashes($server['config']));
}
@@ -59,6 +59,15 @@
}
return ($section == '') ? $this->config['global'] : $this->config['global'][$section];
}
+
+ public function get_security_config($section = '') {
+ global $app;
+
+ $app->uses('ini_parser');
+ $security_config = $app->ini_parser->parse_ini_string(file_get_contents('/usr/local/ispconfig/security/security_settings.ini'));
+
+ return ($section == '') ? $security_config : $security_config[$section];
+ }
}
--
Gitblit v1.9.1