Commit 3285d277 authored by tbrehm's avatar tbrehm

- Added resync of mail domains to resync tool.

parent af9f2556
...@@ -118,6 +118,20 @@ if(isset($_POST['resync_db']) && $_POST['resync_db'] == 1) { ...@@ -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'].'<br />';
}
}
}
//* Resyncing Mailboxes //* Resyncing Mailboxes
if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) { if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) {
$db_table = 'mail_user'; $db_table = 'mail_user';
...@@ -132,7 +146,6 @@ if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) { ...@@ -132,7 +146,6 @@ if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) {
} }
} }
//* Resyncing dns zones //* Resyncing dns zones
if(isset($_POST['resync_dns']) && $_POST['resync_dns'] == 1) { if(isset($_POST['resync_dns']) && $_POST['resync_dns'] == 1) {
$zones = $app->db->queryAllRecords("SELECT id,origin,serial FROM dns_soa WHERE active = 'Y'"); $zones = $app->db->queryAllRecords("SELECT id,origin,serial FROM dns_soa WHERE active = 'Y'");
......
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