Skip to content
Commits on Source (2)
...@@ -1497,9 +1497,9 @@ class backup ...@@ -1497,9 +1497,9 @@ class backup
foreach ($backup_excludes as $ex) { foreach ($backup_excludes as $ex) {
# pass through escapeshellarg if not already done # pass through escapeshellarg if not already done
if ( preg_match( "/^'.+'$/", $ex ) ) { if ( preg_match( "/^'.+'$/", $ex ) ) {
$excludes .= "${arg}${pre}${ex}${post} "; $excludes .= "{$arg}{$pre}{$ex}{$post} ";
} else { } else {
$excludes .= "${arg}" . escapeshellarg("${pre}${ex}${post}") . " "; $excludes .= "{$arg}" . escapeshellarg("{$pre}{$ex}{$post}") . " ";
} }
} }
...@@ -1870,8 +1870,8 @@ class backup ...@@ -1870,8 +1870,8 @@ class backup
//* Remove old backups //* Remove old backups
self::backups_garbage_collection($server_id, 'mysql', $domain_id); self::backups_garbage_collection($server_id, 'mysql', $domain_id);
$prefix_list = array( $prefix_list = array(
"db_${db_name}_", "db_{$db_name}_",
"manual-db_${db_name}_", "manual-db_{$db_name}_",
); );
self::clearBackups($server_id, $domain_id, intval($rec['backup_copies']), $db_backup_dir, $prefix_list); self::clearBackups($server_id, $domain_id, intval($rec['backup_copies']), $db_backup_dir, $prefix_list);
} }
......
...@@ -94,6 +94,7 @@ class cronjob_monitor_clamav_log extends cronjob { ...@@ -94,6 +94,7 @@ class cronjob_monitor_clamav_log extends cronjob {
/* Get the data of the log */ /* Get the data of the log */
$data = $this->_tools->_getLogData($type); $data = $this->_tools->_getLogData($type);
if ($data == null) $data = "\n";
/* Get the data from the LAST log-Entry. /* Get the data from the LAST log-Entry.
* if there can be found: * if there can be found:
......
...@@ -82,6 +82,7 @@ class cronjob_monitor_mail_queue extends cronjob { ...@@ -82,6 +82,7 @@ class cronjob_monitor_mail_queue extends cronjob {
/* Get the data from the mailq */ /* Get the data from the mailq */
$data['output'] = shell_exec('mailq'); $data['output'] = shell_exec('mailq');
if ($data['output'] == null) $data['output'] = "";
/* /*
* The last line has more informations * The last line has more informations
......
...@@ -216,7 +216,7 @@ class cronjob_monitor_system_update extends cronjob { ...@@ -216,7 +216,7 @@ class cronjob_monitor_system_update extends cronjob {
//* Ensure that output is encoded so that it does not break the serialize //* Ensure that output is encoded so that it does not break the serialize
//$res['data']['output'] = htmlentities($res['data']['output']); //$res['data']['output'] = htmlentities($res['data']['output']);
$res['data']['output'] = htmlentities($res['data']['output'], ENT_QUOTES, 'UTF-8'); $res['data']['output'] = $res['data']['output'] ? htmlentities($res['data']['output'], ENT_QUOTES, 'UTF-8') : null;
/* /*
* Insert the data into the database * Insert the data into the database
......
...@@ -668,7 +668,7 @@ class db ...@@ -668,7 +668,7 @@ class db
$clientdb_user = ($conf['db_user']) ? $conf['db_user'] : NULL; $clientdb_user = ($conf['db_user']) ? $conf['db_user'] : NULL;
$clientdb_password = ($conf['db_password']) ? $conf['db_password'] : NULL; $clientdb_password = ($conf['db_password']) ? $conf['db_password'] : NULL;
$clientdb_port = ((int)$conf['db_port']) ? (int)$conf['db_port'] : NULL; $clientdb_port = ((int)$conf['db_port']) ? (int)$conf['db_port'] : NULL;
$clientdb_flags = ($conf['db_flags'] !== NULL) ? $conf['db_flags'] : NULL; $clientdb_flags = (isset($conf['db_flags']) && $conf['db_flags'] !== NULL) ? $conf['db_flags'] : NULL;
require_once 'lib/mysql_clientdb.conf'; require_once 'lib/mysql_clientdb.conf';
......