wichu
2012-05-10 905663d6c12c0ccad01ca80d50c3b83fb1f9466c
interface/web/dns/dns_srv_edit.php
@@ -72,6 +72,35 @@
      parent::onShowNew();
   }
   
   function onShowEnd() {
      global $app, $conf;
      // Split the 3 parts of the SRV Record apart
      $split = explode(' ', $this->dataRecord['data']);
      // Weight
      $this->dataRecord['weight'] = $split[0];
      // Port
      $this->dataRecord['port'] = $split[1];
      // Target
      $this->dataRecord['target'] = $split[2];
      // Bind the new datarecord to the template
      $app->tpl->setVar($this->dataRecord);
      parent::onShowEnd();
   }
   function onBeforeInsert() {
      $this->dataRecord['data'] = $this->dataRecord['weight'] .' '. $this->dataRecord['port'] .' '. $this->dataRecord['target'];
   }
   function onBeforeUpdate() {
      $this->dataRecord['data'] = $this->dataRecord['weight'] .' '. $this->dataRecord['port'] .' '. $this->dataRecord['target'];
   }
   function onSubmit() {
      global $app, $conf;