From 3285d2778a9749e9ab6acd6226871c9e89c15af0 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Fri, 25 May 2012 04:24:37 -0400
Subject: [PATCH] - Added resync of mail domains to resync tool.

---
 interface/web/tools/resync.php |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/interface/web/tools/resync.php b/interface/web/tools/resync.php
index dcc0ac2..5f6bd88 100644
--- a/interface/web/tools/resync.php
+++ b/interface/web/tools/resync.php
@@ -118,6 +118,20 @@
 	}
 }
 
+//* 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
 if(isset($_POST['resync_mailbox']) && $_POST['resync_mailbox'] == 1) {
 	$db_table = 'mail_user';
@@ -131,7 +145,6 @@
 		}
 	}
 }
-
 
 //* Resyncing dns zones
 if(isset($_POST['resync_dns']) && $_POST['resync_dns'] == 1) {

--
Gitblit v1.9.1