From 0108768810a47a03e42f205ee6fa1cd5bd8ef439 Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Tue, 21 Aug 2007 11:10:07 -0400
Subject: [PATCH] Several fixes to avoid strict warnings. Made a variable public in db_mysql.inc.php. Added missing language tokens to en_users.lng

---
 interface/web/dns/dns_a_edit.php |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)

diff --git a/interface/web/dns/dns_a_edit.php b/interface/web/dns/dns_a_edit.php
index ed14342..c5a24d1 100644
--- a/interface/web/dns/dns_a_edit.php
+++ b/interface/web/dns/dns_a_edit.php
@@ -105,6 +105,25 @@
 		
 		parent::onSubmit();
 	}
+	
+	function onAfterInsert() {
+		global $app, $conf;
+		
+		// Update the serial number of the SOA record
+		$soa_id = intval($_POST["zone"]);
+		$serial = time();
+		$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
+	}
+	
+	function onAfterUpdate() {
+		global $app, $conf;
+		
+		// Update the serial number of the SOA record
+		$soa_id = intval($_POST["zone"]);
+		$serial = time();
+		$app->db->query("UPDATE dns_soa SET serial = $serial WHERE id = $soa_id");
+	}
+	
 }
 
 $page = new page_action;

--
Gitblit v1.9.1