From 02bf997271f4d09e91c8fcb9cecd08f06f2400c4 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Thu, 12 Apr 2012 12:04:52 -0400
Subject: [PATCH] Merged revisions 3028-3045 from stable branch.
---
interface/web/tools/dns_resync.php | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/interface/web/tools/dns_resync.php b/interface/web/tools/dns_resync.php
index aed2f4e..c80735d 100644
--- a/interface/web/tools/dns_resync.php
+++ b/interface/web/tools/dns_resync.php
@@ -46,7 +46,7 @@
// Resyncing dns zones
if(isset($_POST['resync']) && $_POST['resync'] == 1) {
$zones = $app->db->queryAllRecords("SELECT id,origin,serial FROM dns_soa WHERE active = 'Y'");
- if(is_array($zones)) {
+ if(is_array($zones) && !empty($zones)) {
foreach($zones as $zone) {
$records = $app->db->queryAllRecords("SELECT id,serial FROM dns_rr WHERE zone = ".$zone['id']." AND active = 'Y'");
if(is_array($records)) {
@@ -60,6 +60,8 @@
$app->db->datalogUpdate('dns_soa', "serial = '".$new_serial."'", 'id', $zone['id']);
$msg .= "Resynced: ".$zone['origin'].'<br />';
}
+ } else {
+ $error .= "No zones found to sync.<br />";
}
}
--
Gitblit v1.9.1