diff --git a/interface/lib/classes/tform_base.inc.php b/interface/lib/classes/tform_base.inc.php index 0c9cda5f5135eeca0300f8327b8e24a41177694f..1c5c6e08af61aa3986544c4e8c63b3f2c66ed041 100644 --- a/interface/lib/classes/tform_base.inc.php +++ b/interface/lib/classes/tform_base.inc.php @@ -992,6 +992,26 @@ class tform_base { } } break; + case 'ISDOMAIN': + $error = false; + if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n'; + if($validator['allowempty'] == 'y' && $field_value == '') { + //* Do nothing + } else { + if(function_exists('filter_var')) { + if(filter_var('check@'.$field_value, FILTER_VALIDATE_EMAIL) === false) { + $errmsg = $validator['errmsg']; + if(isset($this->wordbook[$errmsg])) { + $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n"; + } else { + $this->errorMessage .= $errmsg."<br />\r\n"; + } + } + + } else $this->errorMessage .= "function filter_var missing <br />\r\n"; + } + unset($error); + break; case 'ISEMAIL': $error = false; if($validator['allowempty'] != 'y') $validator['allowempty'] = 'n'; diff --git a/interface/web/mail/form/mail_domain.tform.php b/interface/web/mail/form/mail_domain.tform.php index 5a63d8423b0c4b6a00d30073d1f76424818fb7cc..06fb0906c34e693f994c088274c03b265b61abb7 100644 --- a/interface/web/mail/form/mail_domain.tform.php +++ b/interface/web/mail/form/mail_domain.tform.php @@ -88,8 +88,7 @@ $form["tabs"]['domain'] = array ( 'errmsg'=> 'domain_error_empty'), 1 => array ( 'type' => 'UNIQUE', 'errmsg'=> 'domain_error_unique'), - 2 => array ( 'type' => 'REGEX', - 'regex' => '/^[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/', + 2 => array ( 'type' => 'ISDOMAIN', 'errmsg'=> 'domain_error_regex'), ), 'default' => '', diff --git a/interface/web/mail/mail_domain_del.php b/interface/web/mail/mail_domain_del.php index 6941cd60821cf95d0235ba2eed93d7d5d43ed348..bce89695dc53ee1e016aec966a2d5030014b2db9 100644 --- a/interface/web/mail/mail_domain_del.php +++ b/interface/web/mail/mail_domain_del.php @@ -78,7 +78,7 @@ class page_action extends tform_actions { } // Delete all spamfilters that belong to this domain - $records = $app->db->queryAllRecords("SELECT id FROM spamfilter_users WHERE email = ?", '%@' . $domain); + $records = $app->db->queryAllRecords("SELECT id FROM spamfilter_users WHERE email like ?", '%@' . $domain); foreach($records as $rec) { $app->db->datalogDelete('spamfilter_users', 'id', $rec['id']); } diff --git a/interface/web/sites/lib/lang/nl_web_domain.lng b/interface/web/sites/lib/lang/nl_web_domain.lng index 6aaa1aae5fcac2e22a6a5deed5264aae2822836b..60a06c266a4cbbf04b98e8b54c4278ae8e5cb378 100644 --- a/interface/web/sites/lib/lang/nl_web_domain.lng +++ b/interface/web/sites/lib/lang/nl_web_domain.lng @@ -21,7 +21,7 @@ $wb['active_txt'] = 'Actief'; $wb['document_root_txt'] = 'Documentroot'; $wb['system_user_txt'] = 'Linux gebruiker'; $wb['system_group_txt'] = 'Linux Groep'; -$wb['ip_address_txt'] = 'IP-Adres'; +$wb['ip_address_txt'] = 'IPv4 adres'; $wb['vhost_type_txt'] = 'VHost type'; $wb['hd_quota_txt'] = 'Harddisk quota'; $wb['traffic_quota_txt'] = 'Traffic quota'; @@ -72,7 +72,7 @@ $wb['no_flag_txt'] = 'No flag'; $wb['save_certificate_txt'] = 'Save certificate'; $wb['create_certificate_txt'] = 'Create certificate'; $wb['delete_certificate_txt'] = 'Delete certificate'; -$wb['ipv6_address_txt'] = 'IPv6-Adres'; +$wb['ipv6_address_txt'] = 'IPv6 adres'; $wb['nginx_directives_txt'] = 'nginx Directives'; $wb['seo_redirect_txt'] = 'SEO Redirect'; $wb['non_www_to_www_txt'] = 'Non-www -> www'; diff --git a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng index 23ca63306e965acd1f047aeb19bda9931e6aeb48..6940d62c9e80b57ba9a25d207464e3619a421b2c 100644 --- a/interface/web/sites/lib/lang/nl_web_vhost_domain.lng +++ b/interface/web/sites/lib/lang/nl_web_vhost_domain.lng @@ -21,7 +21,7 @@ $wb['active_txt'] = 'Actief'; $wb['document_root_txt'] = 'Document Root'; $wb['system_user_txt'] = 'Linux gebruiker'; $wb['system_group_txt'] = 'Linux Groep'; -$wb['ip_address_txt'] = 'IP-Adres'; +$wb['ip_address_txt'] = 'IPv4 adres'; $wb['vhost_type_txt'] = 'VHost type'; $wb['hd_quota_txt'] = 'Harddisk quota'; $wb['traffic_quota_txt'] = 'Traffic quota'; @@ -49,7 +49,7 @@ $wb['error_ssl_organisation_empty'] = 'SSL Organisatie is niet ingvuld.'; $wb['error_ssl_organisation_unit_empty'] = 'SSL Organisatie afdeling is niet ingvuld.'; $wb['error_ssl_country_empty'] = 'SSL land is niet ingvuld.'; $wb['client_group_id_txt'] = 'Klant'; -$wb['stats_password_txt'] = 'Webstatististieken wachtwoord'; +$wb['stats_password_txt'] = 'Webstatistieken wachtwoord'; $wb['allow_override_txt'] = 'Apache AllowOverride'; $wb['limit_web_quota_free_txt'] = 'Max. beschikbare harddisk quota'; $wb['ssl_state_error_regex'] = 'Ongeldige SSL Provincie/staat. Geldige karakters zijn: a-z, 0-9 and .,-_'; @@ -62,8 +62,8 @@ $wb['redirect_error_regex'] = 'Ongeldig redirect pad. Heldige redirects zijn bij $wb['php_open_basedir_txt'] = 'PHP open_basedir'; $wb['traffic_quota_exceeded_txt'] = 'Traffic quota overschreden'; $wb['ruby_txt'] = 'Ruby'; -$wb['stats_user_txt'] = 'Webstatististieken gebruikersnaam'; -$wb['stats_type_txt'] = 'Webstatististieken programma'; +$wb['stats_user_txt'] = 'Webstatistieken gebruikersnaam'; +$wb['stats_type_txt'] = 'Webstatistieken programma'; $wb['custom_php_ini_txt'] = 'Custom php.ini instellingen'; $wb['error_ssl_cert_empty'] = 'SSL Certificate field is empty'; $wb['none_txt'] = 'None'; @@ -73,7 +73,7 @@ $wb['no_flag_txt'] = 'No flag'; $wb['save_certificate_txt'] = 'Certificaat opslaan'; $wb['create_certificate_txt'] = 'Create certificate'; $wb['delete_certificate_txt'] = 'Certificaat verwijderen'; -$wb['ipv6_address_txt'] = 'IPv6-Adres'; +$wb['ipv6_address_txt'] = 'IPv6 adres'; $wb['nginx_directives_txt'] = 'nginx Directives'; $wb['seo_redirect_txt'] = 'SEO Redirect'; $wb['non_www_to_www_txt'] = 'Non-www -> www'; @@ -101,10 +101,10 @@ $wb['pm_max_requests_txt'] = 'PHP-FPM pm.max_requests'; $wb['pm_process_idle_timeout_error_regex'] = 'PHP-FPM pm.process_idle_timeout must be a positive integer value.'; $wb['pm_max_requests_error_regex'] = 'PHP-FPM pm.max_requests must be an integer value >= 0.'; $wb['pm_ondemand_hint_txt'] = 'Please note that you must have PHP version >= 5.3.9 in order to use the ondemand process manager. If you select ondemand for an older PHP version, PHP will not start anymore!'; -$wb['generate_password_txt'] = 'Generate Password'; -$wb['repeat_password_txt'] = 'Repeat Password'; -$wb['password_mismatch_txt'] = 'The passwords do not match.'; -$wb['password_match_txt'] = 'The passwords do match.'; +$wb['generate_password_txt'] = 'Genereer wachtwoord'; +$wb['repeat_password_txt'] = 'Herhaal wachtwoord'; +$wb['password_mismatch_txt'] = 'De wachtwoorden zijn ongelijk.'; +$wb['password_match_txt'] = 'De wachtwoorden zijn gelijk.'; $wb['web_folder_error_regex'] = 'Invalid folder entered. Please do not enter a slash.'; $wb['domain_error_autosub'] = 'There is already a subdomain with these settings.'; $wb['available_php_directive_snippets_txt'] = 'Available PHP Directive Snippets:';