diff --git a/bureau/admin/dom_edit.php b/bureau/admin/dom_edit.php index 7a67ea98..d71dfcc0 100644 --- a/bureau/admin/dom_edit.php +++ b/bureau/admin/dom_edit.php @@ -216,6 +216,17 @@ if (!$r['noerase']) { + + + + + + +
 : + " /> +
+ +
diff --git a/bureau/admin/dom_editdns.php b/bureau/admin/dom_editdns.php index eb6a884e..1087cbec 100644 --- a/bureau/admin/dom_editdns.php +++ b/bureau/admin/dom_editdns.php @@ -34,12 +34,13 @@ $fields = array ( "domain" => array ("request", "string", ""), "dns" => array ("request", "integer", 1), "email" => array ("request", "integer", 1), + "ttl" => array ("request", "integer", 86400), ); getFields($fields); $dom->lock(); -if (!$dom->edit_domain($domain,$dns,$email)) { +if (!$dom->edit_domain($domain,$dns,$email,0,$ttl)) { $error=$err->errstr(); include("dom_edit.php"); $dom->unlock(); diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 23c3667a..6d216b74 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -771,6 +771,7 @@ class m_dom { $r["dns_action"]=$db->Record["dns_action"]; $r["dns_result"]=$db->Record["dns_result"]; $r["mail"]=$db->Record["gesmx"]; + $r["zonettl"]=$db->Record["zonettl"]; $r['noerase']=$db->Record['noerase']; $db->free(); $db->query("SELECT COUNT(*) AS cnt FROM sub_domaines WHERE compte='$cuid' AND domaine='$dom'"); @@ -1073,7 +1074,7 @@ class m_dom { * TRUE sinon. * */ - function edit_domain($dom,$dns,$gesmx,$force=0) { + function edit_domain($dom,$dns,$gesmx,$force=0,$ttl=86400) { global $db,$err,$L_MX,$classes,$cuid,$hooks; $err->log("dom","edit_domain",$dom."/".$dns."/".$gesmx); // Locked ? @@ -1109,7 +1110,7 @@ class m_dom { } if ($dns!="1") $dns="0"; // On vérifie que des modifications ont bien eu lieu :) - if ($r["dns"]==$dns && $r["mail"]==$gesmx) { + if ($r["dns"]==$dns && $r["mail"]==$gesmx && $r["zonettl"]==$ttl) { $err->raise("dom",_("No change has been requested...")); return false; } @@ -1137,7 +1138,7 @@ class m_dom { $hooks->invoke("hook_dom_del_mx_domain",array($r["id"])); } - $db->query("UPDATE domaines SET gesdns='$dns', gesmx='$gesmx' WHERE domaine='$dom'"); + $db->query("UPDATE domaines SET gesdns='$dns', gesmx='$gesmx', zonettl='$ttl' WHERE domaine='$dom'"); $db->query("UPDATE domaines set dns_action='UPDATE' where domaine='$dom';"); return true;