added missing dots in dns template examples and added a function which adds the dots automatically when missing.
| | |
| | | |
| | | 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; |
| | |
| | | $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();
|
| | | }
|
| | |
|
| | |
| | | </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>
|