tbrehm
2009-01-11 443d7e066c807096dcf6950ea7714d17e7cb7d88
added missing dots in dns template examples and added a function which adds the dots automatically when missing.
3 files modified
27 ■■■■ changed files
interface/lib/classes/tform_actions.inc.php 10 ●●●● patch | view | raw | blame | history
interface/web/dns/dns_soa_edit.php 11 ●●●●● patch | view | raw | blame | history
interface/web/dns/templates/dns_soa_edit.htm 6 ●●●● patch | view | raw | blame | history
interface/lib/classes/tform_actions.inc.php
@@ -30,11 +30,11 @@
class tform_actions {
        var $id;
        var $activeTab;
        var $dataRecord;
        var $plugins = array();
        var $oldDataRecord; // This array is only filled during updates and when db_history is enabled.
        public $id;
        public $activeTab;
        public $dataRecord;
        public $plugins = array();
        public $oldDataRecord; // This array is only filled during updates and when db_history is enabled.
        function onLoad() {
                global $app, $conf, $tform_def_file;
interface/web/dns/dns_soa_edit.php
@@ -127,6 +127,17 @@
        $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
        if(substr($this->dataRecord["origin"],-1,1) != '.') $this->dataRecord["origin"] .= '.';
        if(substr($this->dataRecord["ns"],-1,1) != '.') $this->dataRecord["ns"] .= '.';
        if(substr($this->dataRecord["mbox"],-1,1) != '.') $this->dataRecord["mbox"] .= '.';
        //* Replace @ in mbox
        if(stristr($this->dataRecord["mbox"],'@')) {
            $this->dataRecord["mbox"] = str_replace('@','.',$this->dataRecord["mbox"]);
        }
        parent::onSubmit();
    }
    
interface/web/dns/templates/dns_soa_edit.htm
@@ -22,15 +22,15 @@
      </tmpl_if>
      <span class="wf_oneField">
        <label for="origin" class="wf_preField">{tmpl_var name='origin_txt'}</label>
        <input type="text" id="origin" name="origin" value="{tmpl_var name='origin'}" size="30" maxlength="255">  e.g. domain.tld
        <input type="text" id="origin" name="origin" value="{tmpl_var name='origin'}" size="30" maxlength="255">  e.g. domain.tld.
      </span>
      <span class="wf_oneField">
        <label for="ns" class="wf_preField">{tmpl_var name='ns_txt'}</label>
        <input type="text" id="ns" name="ns" value="{tmpl_var name='ns'}" size="30" maxlength="255"> e.g. ns1.domain.tld
        <input type="text" id="ns" name="ns" value="{tmpl_var name='ns'}" size="30" maxlength="255"> e.g. ns1.domain.tld.
      </span>
      <span class="wf_oneField">
        <label for="mbox" class="wf_preField">{tmpl_var name='mbox_txt'}</label>
        <input type="text" id="mbox" name="mbox" value="{tmpl_var name='mbox'}" size="30" maxlength="255"> e.g. webmaster.domain.tld
        <input type="text" id="mbox" name="mbox" value="{tmpl_var name='mbox'}" size="30" maxlength="255"> e.g. webmaster.domain.tld.
      </span>
      <span class="wf_oneField">
        <label for="refresh" class="wf_preField">{tmpl_var name='refresh_txt'}</label>