Skip to content
Commits on Source (2)
......@@ -1497,9 +1497,9 @@ class backup
foreach ($backup_excludes as $ex) {
# pass through escapeshellarg if not already done
if ( preg_match( "/^'.+'$/", $ex ) ) {
$excludes .= "${arg}${pre}${ex}${post} ";
$excludes .= "{$arg}{$pre}{$ex}{$post} ";
} else {
$excludes .= "${arg}" . escapeshellarg("${pre}${ex}${post}") . " ";
$excludes .= "{$arg}" . escapeshellarg("{$pre}{$ex}{$post}") . " ";
}
}
......@@ -1870,8 +1870,8 @@ class backup
//* Remove old backups
self::backups_garbage_collection($server_id, 'mysql', $domain_id);
$prefix_list = array(
"db_${db_name}_",
"manual-db_${db_name}_",
"db_{$db_name}_",
"manual-db_{$db_name}_",
);
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 {
/* Get the data of the log */
$data = $this->_tools->_getLogData($type);
if ($data == null) $data = "\n";
/* Get the data from the LAST log-Entry.
* if there can be found:
......
......@@ -82,6 +82,7 @@ class cronjob_monitor_mail_queue extends cronjob {
/* Get the data from the mailq */
$data['output'] = shell_exec('mailq');
if ($data['output'] == null) $data['output'] = "";
/*
* The last line has more informations
......
......@@ -216,7 +216,7 @@ class cronjob_monitor_system_update extends cronjob {
//* 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'], 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
......
......@@ -668,7 +668,7 @@ class db
$clientdb_user = ($conf['db_user']) ? $conf['db_user'] : NULL;
$clientdb_password = ($conf['db_password']) ? $conf['db_password'] : 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';
......