ftimme
2013-03-13 35ccdef6c75424ff0782cd873bb0fe7ec03536b5
- Fixed FS#2736 - entering multiple DNS MX records outputs errors... 
3 files modified
13 ■■■■■ changed files
interface/web/dns/dns_mx_edit.php 11 ●●●●● patch | view | raw | blame | history
interface/web/dns/lib/lang/de_dns_mx.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dns/lib/lang/en_dns_mx.lng 1 ●●●● patch | view | raw | blame | history
interface/web/dns/dns_mx_edit.php
@@ -108,6 +108,17 @@
        parent::onSubmit();
    }
    
    function onInsert() {
        global $app, $conf;
        // Check if record is existing already
        $duplicate_mx = $app->db->queryOneRecord("SELECT * FROM dns_rr WHERE zone = ".$app->functions->intval($this->dataRecord["zone"])." AND name = '".$this->dataRecord["name"]."' AND type = '".$this->dataRecord["type"]."' AND data = '".$this->dataRecord["data"]."' AND ".$app->tform->getAuthSQL('r'));
        if(is_array($duplicate_mx) && !empty($duplicate_mx)) $app->error($app->tform->wordbook["duplicate_mx_record_txt"]);
        parent::onInsert();
    }
    function onAfterInsert() {
        global $app, $conf;
        
interface/web/dns/lib/lang/de_dns_mx.lng
@@ -13,4 +13,5 @@
$wb['name_error_regex'] = 'Der Hostname hat das falsche Format.';
$wb['data_error_empty'] = 'Mailserver Hostname ist leer';
$wb['data_error_regex'] = 'Mailserver Hostname Format ist ungültig';
$wb["duplicate_mx_record_txt"] = 'Doppelter MX-Eintrag.';
?>
interface/web/dns/lib/lang/en_dns_mx.lng
@@ -13,4 +13,5 @@
$wb["name_error_regex"] = 'The hostname has the wrong format.';
$wb["data_error_empty"] = 'Mailserver hostname empty';
$wb["data_error_regex"] = 'Mailserver hostname format invalid';
$wb["duplicate_mx_record_txt"] = 'Duplicate MX record.';
?>