From 9026a458a084991bbda2d04b2207832cd878f2fb Mon Sep 17 00:00:00 2001
From: pedro_morgan <pedro_morgan@ispconfig3>
Date: Sat, 18 Aug 2007 22:59:59 -0400
Subject: [PATCH] * Ammended config in with $DB connection idea * Minor tweaks to app * Made $conf global in teh tempalte class (its not global in the loader function either)
---
interface/web/dns/dns_ptr_edit.php | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/interface/web/dns/dns_ptr_edit.php b/interface/web/dns/dns_ptr_edit.php
index 1250523..4335648 100644
--- a/interface/web/dns/dns_ptr_edit.php
+++ b/interface/web/dns/dns_ptr_edit.php
@@ -105,6 +105,24 @@
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