Commit 98a32a22 authored by Till Brehm's avatar Till Brehm

Merge branch 'stable-3.1' into 'stable-3.1'

fixed sql-query for master-server for mail-backups

See merge request !819
parents 762a62a4 a27954c5
......@@ -242,7 +242,7 @@ class cronjob_backup_mail extends cronjob {
if(!is_file($mail_backup_dir.'/'.$backup['filename'])){
$sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?";
$app->db->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']);
if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql);
if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $backup['parent_domain_id'], $backup['filename']);
}
}
}
......
......@@ -296,7 +296,7 @@ class backup_plugin {
unlink($mail_backup_file);
$sql = "DELETE FROM mail_backup WHERE server_id = ? AND parent_domain_id = ? AND filename = ?";
$app->db->query($sql, $conf['server_id'], $mail_backup['parent_domain_id'], $mail_backup['filename']);
if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql);
if($app->db->dbHost != $app->dbmaster->dbHost) $app->dbmaster->query($sql, $conf['server_id'], $mail_backup['parent_domain_id'], $mail_backup['filename']);
$app->log('unlink '.$backup_dir.'/'.$mail_backup['filename'], LOGLEVEL_DEBUG);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment