From 3285d2778a9749e9ab6acd6226871c9e89c15af0 Mon Sep 17 00:00:00 2001 From: tbrehm Date: Fri, 25 May 2012 08:24:37 +0000 Subject: [PATCH] - Added resync of mail domains to resync tool. --- interface/web/tools/resync.php | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/interface/web/tools/resync.php b/interface/web/tools/resync.php index dcc0ac281..5f6bd885a 100644 --- a/interface/web/tools/resync.php +++ b/interface/web/tools/resync.php @@ -118,6 +118,20 @@ if(isset($_POST['resync_db']) && $_POST['resync_db'] == 1) { } } +//* Resyncing Mailbox Domains +if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) { + $db_table = 'mail_domain'; + $index_field = 'domain_id'; + $sql = "SELECT * FROM ".$db_table." WHERE active = 'y'"; + $records = $app->db->queryAllRecords($sql); + if(is_array($records)) { + foreach($records as $rec) { + $app->db->datalogUpdate($db_table, $rec, $index_field, $rec[$index_field], true); + $msg .= "Resynced Mail Domain: ".$rec['domain'].'
'; + } + } +} + //* Resyncing Mailboxes if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) { $db_table = 'mail_user'; @@ -132,7 +146,6 @@ if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) { } } - //* Resyncing dns zones if(isset($_POST['resync_dns']) && $_POST['resync_dns'] == 1) { $zones = $app->db->queryAllRecords("SELECT id,origin,serial FROM dns_soa WHERE active = 'Y'"); -- GitLab