mcramer
2012-09-26 8c1761c64a5c6a24575f43e5afe7a1661cb7f34f
Implemented:  FS#1102 - Convert internationalized domains to punycode automatically
- need to have the pecl idn and intl modules installed
or
- have the idna_convert class in the classes/idn/ path

71 files modified
590 ■■■■■ changed files
interface/lib/classes/functions.inc.php 69 ●●●●● patch | view | raw | blame | history
interface/lib/classes/listform.inc.php 5 ●●●●● patch | view | raw | blame | history
interface/lib/classes/remoting_lib.inc.php 12 ●●●● patch | view | raw | blame | history
interface/lib/classes/tform.inc.php 20 ●●●● patch | view | raw | blame | history
interface/web/admin/form/server_config.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/admin/form/system_config.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/admin/list/server.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/client/form/client.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/client/form/domain.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/client/form/reseller.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/client/list/domain.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_a.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_alias.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_cname.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_hinfo.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_mx.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_ns.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_ptr.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_rp.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_slave.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_soa.tform.php 21 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_srv.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/dns/form/dns_txt.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/dns/list/dns_a.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/dns/list/dns_slave.list.php 6 ●●●●● patch | view | raw | blame | history
interface/web/dns/list/dns_soa.list.php 9 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_alias.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_aliasdomain.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_domain.tform.php 10 ●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_domain_catchall.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_forward.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_get.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_mailinglist.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_transport.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/mail_user.tform.php 14 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/spamfilter_config.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/spamfilter_users.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/mail/form/spamfilter_whitelist.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_alias.list.php 6 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_aliasdomain.list.php 6 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_domain.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_domain_catchall.list.php 6 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_forward.list.php 6 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_get.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_mailinglist.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_transport.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_user.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/mail_user_stats.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/mail/list/user_quota_stats.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/mail/mail_domain_edit.php 2 ●●● patch | view | raw | blame | history
interface/web/mailuser/form/mail_user_cc.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/sites/form/web_aliasdomain.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/sites/form/web_domain.tform.php 10 ●●●● patch | view | raw | blame | history
interface/web/sites/form/web_subdomain.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/sites/form/web_vhost_subdomain.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/ftp_user.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/shell_user.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/user_quota_stats.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/web_aliasdomain.list.php 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/web_domain.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/web_folder.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/web_folder_user.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/web_sites_stats.list.php 3 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/web_subdomain.list.php 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/list/web_vhost_subdomain.list.php 6 ●●●●● patch | view | raw | blame | history
interface/web/sites/web_aliasdomain_edit.php 2 ●●● patch | view | raw | blame | history
interface/web/sites/web_domain_edit.php 2 ●●● patch | view | raw | blame | history
interface/web/sites/web_subdomain_edit.php 2 ●●● patch | view | raw | blame | history
interface/web/sites/web_vhost_subdomain_edit.php 2 ●●● patch | view | raw | blame | history
interface/web/vm/form/openvz_vm.tform.php 7 ●●●●● patch | view | raw | blame | history
interface/web/vm/list/openvz_vm.list.php 3 ●●●●● patch | view | raw | blame | history
interface/lib/classes/functions.inc.php
@@ -32,7 +32,8 @@
//* This class is loaded automatically by the ispconfig framework.
class functions {
    var $idn_converter = null;
    var $idn_converter_name = '';
    public function mail($to, $subject, $text, $from, $filepath = '', $filetype = 'application/pdf', $filename = '', $cc = '', $bcc = '', $from_name = '') {
        global $app,$conf;
@@ -310,6 +311,72 @@
            return intval($string);
        }
    }
    /** IDN converter wrapper.
     * all converter classes should be placed in ISPC_CLASS_PATH.'/idn/'
     */
    public function idn_encode($domain) {
        if($domain == '') return '';
        if(preg_match('/^[0-9\.]+$/', $domain)) return $domain; // may be an ip address - anyway does not need to bee encoded
        // get domain and user part if it is an email
        $user_part = false;
        if(strpos($domain, '@') !== false) {
            $user_part = substr($domain, 0, strrpos($domain, '@'));
            $domain = substr($domain, strrpos($domain, '@') + 1);
        }
        if(function_exists('idn_to_ascii')) {
            $domain = idn_to_ascii($domain);
        } elseif(file_exists(ISPC_CLASS_PATH.'/idn/idna_convert.class.php')) {
             /* use idna class:
             * @author  Matthias Sommerfeld <mso@phlylabs.de>
             * @copyright 2004-2011 phlyLabs Berlin, http://phlylabs.de
             * @version 0.8.0 2011-03-11
             */
            if(!is_object($this->idn_converter) || $this->idn_converter_name != 'idna_convert.class') {
                include_once(ISPC_CLASS_PATH.'/idn/idna_convert.class.php');
                $this->idn_converter = new idna_convert(array('idn_version' => 2008));
                $this->idn_converter_name = 'idna_convert.class';
            }
            $domain = $this->idn_converter->encode($domain);
        }
        if($user_part !== false) return $user_part . '@' . $domain;
        else return $domain;
    }
    public function idn_decode($domain) {
        if($domain == '') return '';
        if(preg_match('/^[0-9\.]+$/', $domain)) return $domain; // may be an ip address - anyway does not need to bee decoded
        // get domain and user part if it is an email
        $user_part = false;
        if(strpos($domain, '@') !== false) {
            $user_part = substr($domain, 0, strrpos($domain, '@'));
            $domain = substr($domain, strrpos($domain, '@') + 1);
        }
        if(function_exists('idn_to_utf8')) {
            $domain = idn_to_utf8($domain);
        } elseif(file_exists(ISPC_CLASS_PATH.'/idn/idna_convert.class.php')) {
             /* use idna class:
             * @author  Matthias Sommerfeld <mso@phlylabs.de>
             * @copyright 2004-2011 phlyLabs Berlin, http://phlylabs.de
             * @version 0.8.0 2011-03-11
             */
            if(!is_object($this->idn_converter) || $this->idn_converter_name != 'idna_convert.class') {
                include_once(ISPC_CLASS_PATH.'/idn/idna_convert.class.php');
                $this->idn_converter = new idna_convert(array('idn_version' => 2008));
                $this->idn_converter_name = 'idna_convert.class';
            }
            $domain = $this->idn_converter->decode($domain);
        }
        if($user_part !== false) return $user_part . '@' . $domain;
        else return $domain;
    }
        
}
interface/lib/classes/listform.inc.php
@@ -291,6 +291,11 @@
        if(is_array($record) && count($record) > 0 && is_array($this->listDef['item'])) {
            foreach($this->listDef['item'] as $field){
                $key = $field['field'];
                //* Apply filter to record value.
                if(isset($field['filters']) && is_array($field['filters'])) {
                    $app->uses('tform');
                    $record[$key] = $app->tform->filterField($key, (isset($record[$key]))?$record[$key]:'', $field['filters'], 'SHOW');
                }
                if(isset($record[$key])) {
                    switch ($field['datatype']){
                    case 'VARCHAR':
interface/lib/classes/remoting_lib.inc.php
@@ -418,18 +418,10 @@
                            $returnval = strtoupper($field_value);
                        break;
                        case 'IDNTOASCII':
                            if(function_exists('idn_to_ascii')) {
                                $returnval = idn_to_ascii($field_value);
                            } else {
                                $returnval = $field_value;
                            }
                            $returnval = $app->functions->idn_encode($field_value);
                        break;
                        case 'IDNTOUTF8':
                            if(function_exists('idn_to_utf8')) {
                                $returnval = idn_to_utf8($field_value);
                            } else {
                                $returnval = $field_value;
                            }
                            $returnval = $app->functions->idn_decode($field_value);
                        break;
                        default:
                            $this->errorMessage .= "Unknown Filter: ".$filter['type'];
interface/lib/classes/tform.inc.php
@@ -629,7 +629,6 @@
                                if(isset($field['filters']) && is_array($field['filters'])) {
                                    $record[$key] = $this->filterField($key, (isset($record[$key]))?$record[$key]:'', $field['filters'], 'SAVE');
                                }
                                //* Validate record value
                                if(isset($field['validators']) && is_array($field['validators'])) {
                                    $this->validateField($key, (isset($record[$key]))?$record[$key]:'', $field['validators']);
@@ -738,24 +737,16 @@
                if($filter['event'] == $filter_event) {
                    switch ($filter['type']) {
                        case 'TOLOWER':
                            $returnval = strtolower($field_value);
                            $returnval = strtolower($returnval);
                        break;
                        case 'TOUPPER':
                            $returnval = strtoupper($field_value);
                            $returnval = strtoupper($returnval);
                        break;
                        case 'IDNTOASCII':
                            if(function_exists('idn_to_ascii')) {
                                $returnval = idn_to_ascii($field_value);
                            } else {
                                $returnval = $field_value;
                            }
                            $returnval = $app->functions->idn_encode($returnval);
                        break;
                        case 'IDNTOUTF8':
                            if(function_exists('idn_to_utf8')) {
                                $returnval = idn_to_utf8($field_value);
                            } else {
                                $returnval = $field_value;
                            }
                            $returnval = $app->functions->idn_decode($returnval);
                        break;
                        default:
                            $this->errorMessage .= "Unknown Filter: ".$filter['type'];
@@ -763,8 +754,7 @@
                    }
                }
            }
            return $returnval;
            return $returnval;
        }
        /**
interface/web/admin/form/server_config.tform.php
@@ -109,6 +109,13 @@
            'datatype' => 'VARCHAR',
            'formtype' => 'TEXT',
            'default' => 'server1.domain.tld',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators' => array(0 => array('type' => 'NOTEMPTY',
                    'errmsg' => 'hostname_error_empty'),
            ),
interface/web/admin/form/system_config.tform.php
@@ -212,6 +212,13 @@
        ),
        'admin_mail' => array (
            'datatype'    => 'VARCHAR',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'formtype'    => 'TEXT',
            'default'    => '',
            'value'        => '',
@@ -234,6 +241,13 @@
        ),
        'smtp_host' => array (
            'datatype'    => 'VARCHAR',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'formtype'    => 'TEXT',
            'default'    => '',
            'value'        => '',
interface/web/admin/list/server.list.php
@@ -46,6 +46,9 @@
$liste['item'][] = array(    'field'        => 'server_name',
                            'datatype'    => 'VARCHAR',
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => 'TEXT',
                            'op'        => 'like',
                            'prefix'    => '%',
interface/web/client/form/client.tform.php
@@ -285,6 +285,13 @@
        'email' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'default'    => '',
            'value'        => '',
            'separator'    => '',
interface/web/client/form/domain.tform.php
@@ -88,6 +88,13 @@
        'domain' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'domain_error_empty'),
                                        1 => array (    'type'    => 'UNIQUE',
interface/web/client/form/reseller.tform.php
@@ -286,6 +286,13 @@
        'email' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'default'    => '',
            'value'        => '',
            'separator'    => '',
interface/web/client/list/domain.list.php
@@ -75,6 +75,9 @@
*****************************************************/
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "LIKE",
                            'prefix'    => "%",
interface/web/dns/form/dns_a.tform.php
@@ -78,6 +78,13 @@
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[\w\.\-\*]{0,64}$/',
                                                        'errmsg'=> 'name_error_regex'),
interface/web/dns/form/dns_alias.tform.php
@@ -78,6 +78,13 @@
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'name_error_empty'),
                                        1 => array (    'type'    => 'REGEX',
@@ -100,6 +107,13 @@
        'data' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'data_error_empty'),
                                        1 => array (    'type'    => 'REGEX',
interface/web/dns/form/dns_cname.tform.php
@@ -78,6 +78,13 @@
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[\w\.\-\*]{0,255}$/',
                                                        'errmsg'=> 'name_error_regex'),
@@ -98,6 +105,13 @@
        'data' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'data_error_empty'),
                                        1 => array (    'type'    => 'REGEX',
interface/web/dns/form/dns_hinfo.tform.php
@@ -78,6 +78,13 @@
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'name_error_empty'),
                                        1 => array (    'type'    => 'REGEX',
interface/web/dns/form/dns_mx.tform.php
@@ -79,6 +79,13 @@
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[\w\.\-\*]{0,255}$/',
                                                        'errmsg'=> 'name_error_regex'),
@@ -99,6 +106,13 @@
        'data' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'data_error_empty'),
                                        1 => array (    'type'    => 'REGEX',
interface/web/dns/form/dns_ns.tform.php
@@ -78,6 +78,13 @@
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[\w\.\-]{0,255}$/',
                                                        'errmsg'=> 'name_error_regex'),
@@ -98,6 +105,13 @@
        'data' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'data_error_empty'),
                                        1 => array (    'type'    => 'REGEX',
interface/web/dns/form/dns_ptr.tform.php
@@ -78,6 +78,13 @@
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[\w\.\-]{1,256}$/',
                                                        'errmsg'=> 'name_error_regex'),
@@ -98,6 +105,13 @@
        'data' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'data_error_empty'),
                                        1 => array (    'type'    => 'REGEX',
interface/web/dns/form/dns_rp.tform.php
@@ -75,6 +75,13 @@
            'width'        => '30',
            'maxlength'    => '255'
        ),
        'filters'   => array( 0 => array( 'event' => 'SAVE',
                                          'type' => 'IDNTOASCII'),
                              1 => array( 'event' => 'SHOW',
                                          'type' => 'IDNTOUTF8'),
                              2 => array( 'event' => 'SAVE',
                                          'type' => 'TOLOWER')
                            ),
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
interface/web/dns/form/dns_slave.tform.php
@@ -82,6 +82,13 @@
        'origin' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'origin_error_empty'),
                                        1 => array (    'type'    => 'UNIQUE',
@@ -99,6 +106,13 @@
        'ns' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[\w\.\-]{1,255}$/',
                                                        'errmsg'=> 'ns_error_regex'),
interface/web/dns/form/dns_soa.tform.php
@@ -83,6 +83,13 @@
        'origin' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'origin_error_empty'),
                                        1 => array (    'type'    => 'UNIQUE',
@@ -100,6 +107,13 @@
        'ns' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[\w\.\-]{1,255}$/',
                                                        'errmsg'=> 'ns_error_regex'),
@@ -113,6 +127,13 @@
        'mbox' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'mbox_error_empty'),
                                        1 => array (    'type'    => 'REGEX',
interface/web/dns/form/dns_srv.tform.php
@@ -78,6 +78,13 @@
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[\w\.\-]{0,255}$/',
                                                        'errmsg'=> 'name_error_regex'),
interface/web/dns/form/dns_txt.tform.php
@@ -78,6 +78,13 @@
        'name' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^[\w\.\-]{0,255}$/',
                                                        'errmsg'=> 'name_error_regex'),
interface/web/dns/list/dns_a.list.php
@@ -74,6 +74,9 @@
$liste["item"][] = array(    'field'        => "zone",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "SELECT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/dns/list/dns_slave.list.php
@@ -73,6 +73,9 @@
$liste["item"][] = array(   'field'    => "origin",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'    => "like",
                            'prefix'    => "%",
@@ -83,6 +86,9 @@
$liste["item"][] = array(   'field'    => "ns",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'    => "like",
                            'prefix'    => "%",
interface/web/dns/list/dns_soa.list.php
@@ -73,6 +73,9 @@
$liste["item"][] = array(    'field'        => "origin",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
@@ -83,6 +86,9 @@
$liste["item"][] = array(    'field'        => "ns",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
@@ -93,6 +99,9 @@
$liste["item"][] = array(    'field'        => "mbox",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/form/mail_alias.tform.php
@@ -74,6 +74,13 @@
        'source' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'ISEMAIL',
                                                        'errmsg'=> 'email_error_isemail'),
                                    ),
@@ -86,6 +93,13 @@
        'destination' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'SELECT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'default'    => '',
            'datasource'    => array (     'type'            => 'SQL',
                                        'querystring'     => 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email',
interface/web/mail/form/mail_aliasdomain.tform.php
@@ -74,6 +74,13 @@
        'source' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'source_error_empty'),
                                        1 => array (    'type'    => 'UNIQUE',
@@ -91,6 +98,13 @@
        'destination' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'default'    => '',
            'value'        => '',
            'width'        => '30',
interface/web/mail/form/mail_domain.tform.php
@@ -77,9 +77,13 @@
        'domain' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'    => array (         0 => array (    'type'    => 'TOLOWER',
                                                        'event'=> 'SAVE'),
                                    ),
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'domain_error_empty'),
                                        1 => array (    'type'    => 'UNIQUE',
interface/web/mail/form/mail_domain_catchall.tform.php
@@ -74,6 +74,13 @@
        'source' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'domain_error_empty'),
                                        1 => array (    'type'    => 'UNIQUE',
@@ -91,6 +98,13 @@
        'destination' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'default'    => '',
            /*
            'datasource'    => array (     'type'            => 'SQL',
interface/web/mail/form/mail_forward.tform.php
@@ -74,6 +74,13 @@
        'source' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'ISEMAIL',
                                                        'errmsg'=> 'email_error_isemail'),
                                    ),
@@ -86,6 +93,13 @@
        'destination' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'default'    => '',
            'value'        => '',
            'width'        => '30',
interface/web/mail/form/mail_get.tform.php
@@ -84,6 +84,13 @@
        'source_server' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'source_server_error_isempty'),
                                        1 => array (    'type'    => 'REGEX',
@@ -134,6 +141,13 @@
        'destination' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'SELECT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'default'    => '',
            'datasource'    => array (     'type'            => 'SQL',
                                        'querystring'     => 'SELECT email FROM mail_user WHERE {AUTHSQL} ORDER BY email',
interface/web/mail/form/mail_mailinglist.tform.php
@@ -77,6 +77,13 @@
        'domain' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'domain_error_empty'),
                                        1 => array (    'type'    => 'REGEX',
@@ -104,6 +111,13 @@
        'email' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'ISEMAIL',
                                                        'errmsg'=> 'email_error_isemail'),
                                    ),
interface/web/mail/form/mail_transport.tform.php
@@ -77,6 +77,13 @@
        'domain' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'default'    => '',
            'value'        => '',
            'width'        => '30',
interface/web/mail/form/mail_user.tform.php
@@ -75,6 +75,13 @@
        'email' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'ISEMAIL',
                                                        'errmsg'=> 'email_error_isemail'),
                                        1 => array (    'type'    => 'UNIQUE',
@@ -136,6 +143,13 @@
        'cc' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\.[a-z\-]{2,10}){0,1}$/i',
                                                        'errmsg'=> 'cc_error_isemail'),
interface/web/mail/form/spamfilter_config.tform.php
@@ -95,6 +95,13 @@
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'default'    => 'server1.domain.tld',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'hostname_error_empty'),
                                    ),
interface/web/mail/form/spamfilter_users.tform.php
@@ -90,6 +90,13 @@
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'default'    => '',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'email_error_notempty'),
                                    ),
interface/web/mail/form/spamfilter_whitelist.tform.php
@@ -90,6 +90,13 @@
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'default'    => '',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'email_error_notempty'),
                                    ),
interface/web/mail/list/mail_alias.list.php
@@ -59,6 +59,9 @@
$liste["item"][] = array(    'field'        => "source",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
@@ -68,6 +71,9 @@
$liste["item"][] = array(    'field'        => "destination",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/mail_aliasdomain.list.php
@@ -59,6 +59,9 @@
$liste["item"][] = array(    'field'        => "source",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
@@ -68,6 +71,9 @@
$liste["item"][] = array(    'field'        => "destination",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/mail_domain.list.php
@@ -95,6 +95,9 @@
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/mail_domain_catchall.list.php
@@ -59,6 +59,9 @@
$liste["item"][] = array(    'field'        => "source",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
@@ -68,6 +71,9 @@
$liste["item"][] = array(    'field'        => "destination",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/mail_forward.list.php
@@ -59,6 +59,9 @@
$liste["item"][] = array(    'field'        => "source",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
@@ -68,6 +71,9 @@
$liste["item"][] = array(    'field'        => "destination",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/mail_get.list.php
@@ -91,6 +91,9 @@
$liste["item"][] = array(    'field'        => "destination",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/mail_mailinglist.list.php
@@ -57,6 +57,9 @@
                            
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/mail_transport.list.php
@@ -74,6 +74,9 @@
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/mail_user.list.php
@@ -49,6 +49,9 @@
$liste["item"][] = array(   'field'     => "email",
                            'datatype'  => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'  => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/mail_user_stats.list.php
@@ -49,6 +49,9 @@
$liste["item"][] = array(    'field'        => "email",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/list/user_quota_stats.list.php
@@ -47,6 +47,9 @@
$liste["item"][] = array(   'field'     => "email",
                            'datatype'  => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'  => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/mail/mail_domain_edit.php
@@ -140,7 +140,7 @@
                    if ($domain['domain'] == $this->dataRecord["domain"]) {
                        $domain_select .= " selected";
                    }
                    $domain_select .= ">" . $domain['domain'] . "</option>\r\n";
                    $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n";
                }
            }
            else {
interface/web/mailuser/form/mail_user_cc.tform.php
@@ -61,6 +61,13 @@
        'cc' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'REGEX',
                                                        'regex' => '/^(\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z\-]{2,10}){0,1}$/i',
                                                        'errmsg'=> 'cc_error_isemail'),
interface/web/sites/form/web_aliasdomain.tform.php
@@ -72,6 +72,13 @@
        'domain' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (  0 => array (    'type'  => 'CUSTOM',
                                                        'class' => 'validate_domain',
                                                        'function' => 'alias_domain',
interface/web/sites/form/web_domain.tform.php
@@ -119,14 +119,18 @@
        'domain' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (  0 => array (    'type'  => 'CUSTOM',
                                                        'class' => 'validate_domain',
                                                        'function' => 'web_domain',
                                                        'errmsg'=> 'domain_error_regex'),
                                    ),
            'filters'    => array (     0 => array (    'event'    => 'SAVE',
                                                    'type'    => 'TOLOWER'),
                                    ),
            'default'    => '',
            'value'        => '',
            'width'        => '30',
interface/web/sites/form/web_subdomain.tform.php
@@ -72,6 +72,13 @@
        'domain' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (  0 => array (    'type'  => 'CUSTOM',
                                                        'class' => 'validate_domain',
                                                        'function' => 'sub_domain',
interface/web/sites/form/web_vhost_subdomain.tform.php
@@ -111,6 +111,13 @@
        'domain' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (  0 => array (    'type'  => 'CUSTOM',
                                                        'class' => 'validate_domain',
                                                        'function' => 'sub_domain',
interface/web/sites/list/ftp_user.list.php
@@ -74,6 +74,9 @@
$liste["item"][] = array(    'field'        => "parent_domain_id",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "SELECT",
                            'op'        => "=",
                            'prefix'    => "",
interface/web/sites/list/shell_user.list.php
@@ -74,6 +74,9 @@
$liste["item"][] = array(    'field'        => "parent_domain_id",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "SELECT",
                            'op'        => "=",
                            'prefix'    => "",
interface/web/sites/list/user_quota_stats.list.php
@@ -49,6 +49,9 @@
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/sites/list/web_aliasdomain.list.php
@@ -74,6 +74,9 @@
$liste["item"][] = array(    'field'        => "parent_domain_id",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "SELECT",
                            'op'        => "=",
                            'prefix'    => "",
@@ -88,6 +91,9 @@
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/sites/list/web_domain.list.php
@@ -102,6 +102,9 @@
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/sites/list/web_folder.list.php
@@ -74,6 +74,9 @@
$liste["item"][] = array(    'field'        => "parent_domain_id",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "SELECT",
                            'op'        => "=",
                            'prefix'    => "",
interface/web/sites/list/web_folder_user.list.php
@@ -62,6 +62,9 @@
$liste["item"][] = array(    'field'        => "web_folder_id",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "SELECT",
                            'op'        => "=",
                            'prefix'    => "",
interface/web/sites/list/web_sites_stats.list.php
@@ -49,6 +49,9 @@
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/sites/list/web_subdomain.list.php
@@ -74,6 +74,9 @@
$liste["item"][] = array(    'field'        => "parent_domain_id",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "SELECT",
                            'op'        => "=",
                            'prefix'    => "",
@@ -88,6 +91,9 @@
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/sites/list/web_vhost_subdomain.list.php
@@ -74,6 +74,9 @@
$liste["item"][] = array(    'field'        => "parent_domain_id",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "SELECT",
                            'op'        => "=",
                            'prefix'    => "",
@@ -88,6 +91,9 @@
$liste["item"][] = array(    'field'        => "domain",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",
interface/web/sites/web_aliasdomain_edit.php
@@ -99,7 +99,7 @@
                    if ($domain['domain'] == $this->dataRecord["domain"]) {
                        $domain_select .= " selected";
                    }
                    $domain_select .= ">" . $domain['domain'] . "</option>\r\n";
                    $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n";
                }
            }
            else {
interface/web/sites/web_domain_edit.php
@@ -432,7 +432,7 @@
                    if ($domain['domain'] == $this->dataRecord["domain"]) {
                        $domain_select .= " selected";
                    }
                    $domain_select .= ">" . $domain['domain'] . "</option>\r\n";
                    $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n";
                }
            }
            else {
interface/web/sites/web_subdomain_edit.php
@@ -97,7 +97,7 @@
                        $domain_select .= " selected";
                        $selected_domain = $domain['domain'];
                    }
                    $domain_select .= ">" . $domain['domain'] . "</option>\r\n";
                    $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n";
                }
            }
            else {
interface/web/sites/web_vhost_subdomain_edit.php
@@ -252,7 +252,7 @@
                        $domain_select .= " selected";
                        $selected_domain = $domain['domain'];
                    }
                    $domain_select .= ">" . $domain['domain'] . "</option>\r\n";
                    $domain_select .= ">" . $app->functions->idn_decode($domain['domain']) . "</option>\r\n";
                }
            }
            else {
interface/web/vm/form/openvz_vm.tform.php
@@ -117,6 +117,13 @@
        'hostname' => array (
            'datatype'    => 'VARCHAR',
            'formtype'    => 'TEXT',
            'filters'   => array( 0 => array( 'event' => 'SAVE',
                                              'type' => 'IDNTOASCII'),
                                  1 => array( 'event' => 'SHOW',
                                              'type' => 'IDNTOUTF8'),
                                  2 => array( 'event' => 'SAVE',
                                              'type' => 'TOLOWER')
                                ),
            'validators'    => array (     0 => array (    'type'    => 'NOTEMPTY',
                                                        'errmsg'=> 'hostname_error_empty'),
                                    ),
interface/web/vm/list/openvz_vm.list.php
@@ -109,6 +109,9 @@
                            
$liste["item"][] = array(    'field'        => "hostname",
                            'datatype'    => "VARCHAR",
                            'filters'   => array( 0 => array( 'event' => 'SHOW',
                                                              'type' => 'IDNTOUTF8')
                                                ),
                            'formtype'    => "TEXT",
                            'op'        => "like",
                            'prefix'    => "%",