tbrehm
2010-01-19 74829e1a721252733980d16ae69153e2ec6f6ec3
interface/web/dns/dns_soa_edit.php
@@ -135,9 +135,11 @@
         }
      }
      
      /*
      // Update the serial number of the SOA record
      $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ".$this->id);
      $this->dataRecord["serial"] = $app->validate_dns->increase_serial($soa["serial"]);
      */
      
      
      //* Check if soa, ns and mbox have a dot at the end
@@ -176,6 +178,13 @@
   function onAfterUpdate() {
      global $app, $conf;
      
      $tmp = $app->db->diffrec($this->oldDataRecord,$app->tform->getDataRecord($this->id));
      if($tmp['diff_num'] > 0) {
         // Update the serial number of the SOA record
         $soa = $app->db->queryOneRecord("SELECT serial FROM dns_soa WHERE id = ".$this->id);
         $app->db->query("UPDATE dns_soa SET serial = '".$app->validate_dns->increase_serial($soa["serial"])."' WHERE id = ".$this->id);
      }
      // make sure that the record belongs to the client group and not the admin group when a dmin inserts it
      if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {
         $client_group_id = intval($this->dataRecord["client_group_id"]);