From df7e6d07e623dd74f8f88c61dc4c3bd0770d69de Mon Sep 17 00:00:00 2001 From: tbrehm <t.brehm@ispconfig.org> Date: Wed, 26 May 2010 16:20:16 +0000 Subject: [PATCH] Fixed several bugs (revisions 1772-1779 from stable branch). --- install/dist/conf/opensuse112.conf.php | 187 ++++++++++++++++++ install/dist/lib/opensuse.lib.php | 2 +- install/dist/lib/opensuse112.lib.php | 36 ++++ install/lib/install.lib.php | 6 +- install/tpl/mysql-virtual_domains.cf.master | 2 +- .../tpl/mysql-virtual_email2email.cf.master | 2 +- .../tpl/mysql-virtual_forwardings.cf.master | 2 +- install/tpl/mysql-virtual_mailboxes.cf.master | 2 +- install/tpl/mysql-virtual_recipient.cf.master | 2 +- .../tpl/mysql-virtual_relaydomains.cf.master | 2 +- ...mysql-virtual_relayrecipientmaps.cf.master | 2 +- install/tpl/mysql-virtual_sender.cf.master | 2 +- .../tpl/mysql-virtual_transports.cf.master | 2 +- interface/lib/classes/tform.inc.php | 2 +- interface/lib/lang/en.lng | 43 ++-- interface/web/admin/language_edit.php | 6 +- interface/web/mail/lib/lang/en_mail_user.lng | 1 + .../mail_user_autoresponder_edit.htm | 72 +++---- .../web/sites/form/web_aliasdomain.tform.php | 2 +- interface/web/sites/form/web_domain.tform.php | 2 +- .../web/sites/form/web_subdomain.tform.php | 2 +- 21 files changed, 301 insertions(+), 78 deletions(-) create mode 100644 install/dist/conf/opensuse112.conf.php create mode 100644 install/dist/lib/opensuse112.lib.php diff --git a/install/dist/conf/opensuse112.conf.php b/install/dist/conf/opensuse112.conf.php new file mode 100644 index 000000000..9f590e6ad --- /dev/null +++ b/install/dist/conf/opensuse112.conf.php @@ -0,0 +1,187 @@ +<?php + +/* +Copyright (c) 2007, Till Brehm, projektfarm Gmbh +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ISPConfig nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +//*** OpenSUSE 11.0 default settings + +//* Main +$conf['language'] = 'en'; +$conf['distname'] = 'opensuse110'; +$conf['hostname'] = 'server1.domain.tld'; // Full hostname +$conf['ispconfig_install_dir'] = '/usr/local/ispconfig'; +$conf['ispconfig_config_dir'] = '/usr/local/ispconfig'; +$conf['ispconfig_log_priority'] = 2; // 0 = Debug, 1 = Warning, 2 = Error +$conf['server_id'] = 1; +$conf['init_scripts'] = '/etc/init.d'; +$conf['runlevel'] = '/etc'; +$conf['shells'] = '/etc/shells'; +$conf['cron_tab'] = '/var/spool/cron/tabs/root'; +$conf['pam'] = '/etc/pam.d'; + +//* Services provided by this server, this selection will be overridden by the expert mode +$conf['services']['mail'] = true; +$conf['services']['web'] = true; +$conf['services']['dns'] = true; +$conf['services']['file'] = true; +$conf['services']['db'] = true; +$conf['services']['vserver'] = true; + +//* MySQL +$conf['mysql']['installed'] = false; // will be detected automatically during installation +$conf['mysql']['init_script'] = 'mysql'; +$conf['mysql']['host'] = 'localhost'; +$conf['mysql']['ip'] = '127.0.0.1'; +$conf['mysql']['port'] = '3306'; +$conf['mysql']['database'] = 'dbispconfig'; +$conf['mysql']['admin_user'] = 'root'; +$conf['mysql']['admin_password'] = ''; +$conf['mysql']['charset'] = 'utf8'; +$conf['mysql']['ispconfig_user'] = 'ispconfig'; +$conf['mysql']['ispconfig_password'] = md5 (uniqid (rand())); +$conf['mysql']['master_slave_setup'] = 'n'; +$conf['mysql']['master_host'] = ''; +$conf['mysql']['master_database'] = 'dbispconfig'; +$conf['mysql']['master_admin_user'] = 'root'; +$conf['mysql']['master_admin_password'] = ''; +$conf['mysql']['master_ispconfig_user'] = ''; +$conf['mysql']['master_ispconfig_password'] = md5 (uniqid (rand())); + +//* Apache +$conf['apache']['installed'] = false; // will be detected automatically during installation +$conf['apache']['user'] = 'wwwrun'; +$conf['apache']['group'] = 'www'; +$conf['apache']['init_script'] = 'apache2'; +$conf['apache']['version'] = '2.2'; +$conf['apache']['vhost_conf_dir'] = '/etc/apache2/sites-available'; +$conf['apache']['vhost_conf_enabled_dir'] = '/etc/apache2/sites-enabled'; +$conf['apache']['vhost_port'] = '8080'; + +//* Website base settings +$conf['web']['website_basedir'] = '/srv/www'; +$conf['web']['website_path'] = '/srv/www/clients/client[client_id]/web[website_id]'; +$conf['web']['website_symlinks'] = '/srv/www/[website_domain]/:/srv/www/clients/client[client_id]/[website_domain]/'; + +//* Apps base settings +$conf['web']['apps_vhost_ip'] = '_default_'; +$conf['web']['apps_vhost_port'] = '8081'; +$conf['web']['apps_vhost_servername'] = ''; +$conf['web']['apps_vhost_user'] = 'ispapps'; +$conf['web']['apps_vhost_group'] = 'ispapps'; + +//* Fastcgi +$conf['fastcgi']['fastcgi_phpini_path'] = '/etc/php5/cgi/'; +$conf['fastcgi']['fastcgi_starter_path'] = '/srv/www/php-fcgi-scripts/[system_user]/'; + +//* Postfix +$conf['postfix']['installed'] = false; // will be detected automatically during installation +$conf['postfix']['config_dir'] = '/etc/postfix'; +$conf['postfix']['init_script'] = 'postfix'; +$conf['postfix']['user'] = 'postfix'; +$conf['postfix']['group'] = 'postfix'; +$conf['postfix']['vmail_userid'] = '5000'; +$conf['postfix']['vmail_username'] = 'vmail'; +$conf['postfix']['vmail_groupid'] = '5000'; +$conf['postfix']['vmail_groupname'] = 'vmail'; +$conf['postfix']['vmail_mailbox_base'] = '/var/vmail'; + +//* Getmail +$conf['getmail']['installed'] = false; // will be detected automatically during installation +$conf['getmail']['config_dir'] = '/etc/getmail'; +$conf['getmail']['program'] = '/usr/bin/getmail'; + +//* Courier +$conf['courier']['installed'] = false; // will be detected automatically during installation +$conf['courier']['config_dir'] = '/etc/authlib'; +$conf['courier']['courier-authdaemon'] = 'courier-authdaemon'; +$conf['courier']['courier-imap'] = 'courier-imap'; +$conf['courier']['courier-imap-ssl'] = 'courier-imap-ssl'; +$conf['courier']['courier-pop'] = 'courier-pop'; +$conf['courier']['courier-pop-ssl'] = 'courier-pop-ssl'; + +//* Dovecot +$conf['dovecot']['installed'] = false; // will be detected automatically during installation +$conf['dovecot']['config_dir'] = '/etc/dovecot'; +$conf['dovecot']['init_script'] = 'dovecot'; + +//* SASL +$conf['saslauthd']['installed'] = false; // will be detected automatically during installation +$conf['saslauthd']['config'] = '/etc/default/saslauthd'; +$conf['saslauthd']['init_script'] = 'saslauthd'; + +//* Amavisd +$conf['amavis']['installed'] = false; // will be detected automatically during installation +$conf['amavis']['config_dir'] = '/etc'; +$conf['amavis']['init_script'] = 'amavis'; + +//* ClamAV +$conf['clamav']['installed'] = false; // will be detected automatically during installation +$conf['clamav']['init_script'] = 'clamd'; + +//* Pureftpd +$conf['pureftpd']['installed'] = false; // will be detected automatically during installation +$conf['pureftpd']['config_dir'] = '/etc/pure-ftpd'; +$conf['pureftpd']['init_script'] = 'pure-ftpd'; + +//* MyDNS +$conf['mydns']['installed'] = false; // will be detected automatically during installation +$conf['mydns']['config_dir'] = '/etc'; +$conf['mydns']['init_script'] = 'mydns'; + +//* PowerDNS +$conf['powerdns']['installed'] = false; // will be detected automatically during installation +$conf['powerdns']['database'] = 'powerdns'; +$conf["powerdns"]["config_dir"] = '/etc/powerdns/pdns.d'; +$conf['powerdns']['init_script'] = 'pdns'; + +//* BIND DNS Server +$conf['bind']['installed'] = false; // will be detected automatically during installation +$conf['bind']['bind_user'] = 'named'; +$conf['bind']['bind_group'] = 'named'; +$conf['bind']['bind_zonefiles_dir'] = '/var/lib/named'; +$conf['bind']['named_conf_path'] = '/etc/named.conf'; +$conf['bind']['named_conf_local_path'] = '/etc/named.conf.include'; +$conf['bind']['init_script'] = 'named'; + +//* Jailkit +$conf['jailkit']['installed'] = false; // will be detected automatically during installation +$conf['jailkit']['config_dir'] = '/etc/jailkit'; +$conf['jailkit']['jk_init'] = 'jk_init.ini'; +$conf['jailkit']['jk_chrootsh'] = 'jk_chrootsh.ini'; +$conf['jailkit']['jailkit_chroot_app_programs'] = '/usr/bin/groups /usr/bin/id /usr/bin/dircolors /usr/bin/basename /usr/bin/dirname /usr/bin/nano /usr/bin/pico'; +$conf['jailkit']['jailkit_chroot_cron_programs'] = '/usr/bin/php /usr/bin/perl /usr/share/perl /usr/share/php'; + +//* vlogger +$conf['vlogger']['config_dir'] = '/etc'; + +//* cron +$conf['cron']['init_script'] = 'cron'; +$conf['cron']['crontab_dir'] = '/etc/cron.d'; +$conf['cron']['wget'] = '/usr/bin/wget'; + +?> \ No newline at end of file diff --git a/install/dist/lib/opensuse.lib.php b/install/dist/lib/opensuse.lib.php index c68b0c857..e7edc3713 100644 --- a/install/dist/lib/opensuse.lib.php +++ b/install/dist/lib/opensuse.lib.php @@ -381,7 +381,7 @@ class installer_dist extends installer_base { // amavisd user config file $configfile = 'opensuse_amavisd_conf'; - if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf')) @copy($conf["amavis"]["config_dir"].'/amavisd.conf',$conf["courier"]["config_dir"].'/amavisd.conf~'); + if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf')) @copy($conf["amavis"]["config_dir"].'/amavisd.conf',$conf["amavis"]["config_dir"].'/amavisd.conf~'); if(is_file($conf["amavis"]["config_dir"].'/amavisd.conf~')) exec('chmod 400 '.$conf["amavis"]["config_dir"].'/amavisd.conf~'); $content = rf("tpl/".$configfile.".master"); $content = str_replace('{mysql_server_ispconfig_user}',$conf['mysql']['ispconfig_user'],$content); diff --git a/install/dist/lib/opensuse112.lib.php b/install/dist/lib/opensuse112.lib.php new file mode 100644 index 000000000..da77b423a --- /dev/null +++ b/install/dist/lib/opensuse112.lib.php @@ -0,0 +1,36 @@ +<?php + +/* +Copyright (c) 2007, Till Brehm, projektfarm Gmbh +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + * Neither the name of ISPConfig nor the names of its contributors + may be used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY +OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*/ + +class installer extends installer_dist { + + +} + +?> \ No newline at end of file diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php index 6e9379fe7..56c453d16 100644 --- a/install/lib/install.lib.php +++ b/install/lib/install.lib.php @@ -113,14 +113,14 @@ function get_distname() { swriteln("Operating System: openSUSE 11.1 or compatible\n"); } elseif(stristr(file_get_contents('/etc/SuSE-release'),'11.2')) { $distname = 'openSUSE'; - $distver = '11.1'; - $distid = 'opensuse110'; + $distver = '11.2'; + $distid = 'opensuse112'; $distbaseid = 'opensuse'; swriteln("Operating System: openSUSE 11.2 or compatible\n"); } else { $distname = 'openSUSE'; $distver = 'Unknown'; - $distid = 'opensuse110'; + $distid = 'opensuse112'; $distbaseid = 'opensuse'; swriteln("Operating System: openSUSE or compatible, unknown version.\n"); } diff --git a/install/tpl/mysql-virtual_domains.cf.master b/install/tpl/mysql-virtual_domains.cf.master index 5b711422f..729c67759 100644 --- a/install/tpl/mysql-virtual_domains.cf.master +++ b/install/tpl/mysql-virtual_domains.cf.master @@ -4,5 +4,5 @@ dbname = {mysql_server_database} table = mail_domain select_field = domain where_field = domain -additional_conditions = and active = 'y' and server_id = {server_id} +additional_conditions = and active = 'y' hosts = {mysql_server_ip} \ No newline at end of file diff --git a/install/tpl/mysql-virtual_email2email.cf.master b/install/tpl/mysql-virtual_email2email.cf.master index e18ef2407..1e1959156 100644 --- a/install/tpl/mysql-virtual_email2email.cf.master +++ b/install/tpl/mysql-virtual_email2email.cf.master @@ -4,5 +4,5 @@ dbname = {mysql_server_database} table = mail_user select_field = email where_field = email -additional_conditions = and postfix = 'y' and server_id = {server_id} +additional_conditions = and postfix = 'y' hosts = {mysql_server_ip} \ No newline at end of file diff --git a/install/tpl/mysql-virtual_forwardings.cf.master b/install/tpl/mysql-virtual_forwardings.cf.master index b3f3325ba..01281e353 100644 --- a/install/tpl/mysql-virtual_forwardings.cf.master +++ b/install/tpl/mysql-virtual_forwardings.cf.master @@ -4,5 +4,5 @@ dbname = {mysql_server_database} table = mail_forwarding select_field = destination where_field = source -additional_conditions = and active = 'y' and server_id = {server_id} +additional_conditions = and active = 'y' hosts = {mysql_server_ip} \ No newline at end of file diff --git a/install/tpl/mysql-virtual_mailboxes.cf.master b/install/tpl/mysql-virtual_mailboxes.cf.master index d013c34cd..570f069e2 100644 --- a/install/tpl/mysql-virtual_mailboxes.cf.master +++ b/install/tpl/mysql-virtual_mailboxes.cf.master @@ -4,5 +4,5 @@ dbname = {mysql_server_database} table = mail_user select_field = CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/') where_field = email -additional_conditions = and postfix = 'y' and server_id = {server_id} +additional_conditions = and postfix = 'y' hosts = {mysql_server_ip} \ No newline at end of file diff --git a/install/tpl/mysql-virtual_recipient.cf.master b/install/tpl/mysql-virtual_recipient.cf.master index 49024f3eb..254cfe5cb 100644 --- a/install/tpl/mysql-virtual_recipient.cf.master +++ b/install/tpl/mysql-virtual_recipient.cf.master @@ -4,5 +4,5 @@ dbname = {mysql_server_database} table = mail_access select_field = access where_field = source -additional_conditions = and type = 'recipient' and active = 'y' and server_id = {server_id} +additional_conditions = and type = 'recipient' and active = 'y' hosts = {mysql_server_ip} \ No newline at end of file diff --git a/install/tpl/mysql-virtual_relaydomains.cf.master b/install/tpl/mysql-virtual_relaydomains.cf.master index fb7bec1a3..0856467e2 100644 --- a/install/tpl/mysql-virtual_relaydomains.cf.master +++ b/install/tpl/mysql-virtual_relaydomains.cf.master @@ -4,5 +4,5 @@ dbname = {mysql_server_database} table = mail_transport select_field = domain where_field = domain -additional_conditions = and active = 'y' and server_id = {server_id} +additional_conditions = and active = 'y' hosts = {mysql_server_ip} \ No newline at end of file diff --git a/install/tpl/mysql-virtual_relayrecipientmaps.cf.master b/install/tpl/mysql-virtual_relayrecipientmaps.cf.master index a6304fe32..4822f3be9 100644 --- a/install/tpl/mysql-virtual_relayrecipientmaps.cf.master +++ b/install/tpl/mysql-virtual_relayrecipientmaps.cf.master @@ -4,5 +4,5 @@ dbname = {mysql_server_database} table = mail_relay_recipient select_field = access where_field = source -additional_conditions = and active = 'y' and server_id = {server_id} +additional_conditions = and active = 'y' hosts = {mysql_server_ip} \ No newline at end of file diff --git a/install/tpl/mysql-virtual_sender.cf.master b/install/tpl/mysql-virtual_sender.cf.master index 0ef634aec..753145127 100644 --- a/install/tpl/mysql-virtual_sender.cf.master +++ b/install/tpl/mysql-virtual_sender.cf.master @@ -4,5 +4,5 @@ dbname = {mysql_server_database} table = mail_access select_field = access where_field = source -additional_conditions = and type = 'sender' and active = 'y' and server_id = {server_id} +additional_conditions = and type = 'sender' and active = 'y' hosts = {mysql_server_ip} \ No newline at end of file diff --git a/install/tpl/mysql-virtual_transports.cf.master b/install/tpl/mysql-virtual_transports.cf.master index 048a7a81a..0040d1d4e 100644 --- a/install/tpl/mysql-virtual_transports.cf.master +++ b/install/tpl/mysql-virtual_transports.cf.master @@ -4,5 +4,5 @@ dbname = {mysql_server_database} table = mail_transport select_field = transport where_field = domain -additional_conditions = and active = 'y' and server_id = {server_id} +additional_conditions = and active = 'y' hosts = {mysql_server_ip} \ No newline at end of file diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php index 9396b4b46..e790a8bf0 100644 --- a/interface/lib/classes/tform.inc.php +++ b/interface/lib/classes/tform.inc.php @@ -733,7 +733,7 @@ class tform { } break; case 'ISEMAIL': - if(!preg_match("/^\w+[\w.-]*\w{0,}@\w+[\w.-]*\w+\.[a-z]{2,10}$/i", $field_value)) { + if(!preg_match("/^\w+[\w\.\-\+]*\w{0,}@\w+[\w.-]*\w+\.[a-z]{2,10}$/i", $field_value)) { $errmsg = $validator['errmsg']; if(isset($this->wordbook[$errmsg])) { $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n"; diff --git a/interface/lib/lang/en.lng b/interface/lib/lang/en.lng index 1693bb154..12159b6d1 100644 --- a/interface/lib/lang/en.lng +++ b/interface/lib/lang/en.lng @@ -1,26 +1,25 @@ <?php -$wb['conf_format_dateshort'] = 'Y-m-d'; -$wb['conf_format_datelong'] = 'l dS of F Y'; -$wb['conf_format_timeshort'] = 'H:i'; -$wb['conf_format_timelong'] = 'H:i:s'; -$wb['conf_format_datetime'] = 'Y-m-d H:i'; - -$wb['301'] = 'Module not permitted for the current user.'; -$wb['302'] = 'Module invalid.'; -$wb['1001'] = 'The username and password cannot be empty !'; -$wb['1002'] = 'The username and/or password are not correct !'; -$wb['1003'] = 'The username is deactivated!'; -$wb['delete_confirmation'] = 'Do you really want to delete this record?'; -$wb['error_no_view_permission'] = 'You dont have the permission to view this record or this record does not exist!'; -$wb['error_no_delete_permission'] = 'You dont have the permission to delete this record!'; -$wb["page_txt"] = 'Page'; -$wb["page_of_txt"] = 'of'; -$wb["page_and_txt"] = 'and'; -$wb["page_next_txt"] = 'Next'; -$wb["page_back_txt"] = 'Back'; -$wb["delete_txt"] = 'Delete'; -$wb["filter_txt"] = 'Filter'; -$wb["add_new_record_txt"] = 'Add new record'; +$wb['conf_format_dateshort'] = "Y-m-d"; +$wb['conf_format_datelong'] = "l dS of F Y"; +$wb['conf_format_timeshort'] = "H:i"; +$wb['conf_format_timelong'] = "H:i:s"; +$wb['conf_format_datetime'] = "Y-m-d H:i"; +$wb['301'] = "Module not permitted for the current user."; +$wb['302'] = "Module invalid."; +$wb['1001'] = "The username and password cannot be empty !"; +$wb['1002'] = "The username and/or password are not correct !"; +$wb['1003'] = "The username is deactivated!"; +$wb['delete_confirmation'] = "Do you really want to delete this record?"; +$wb['error_no_view_permission'] = "You dont have the permission to view this record or this record does not exist!"; +$wb['error_no_delete_permission'] = "You dont have the permission to delete this record!"; +$wb['page_txt'] = "Page"; +$wb['page_of_txt'] = "of"; +$wb['page_and_txt'] = "and"; +$wb['page_next_txt'] = "Next"; +$wb['page_back_txt'] = "Back"; +$wb['delete_txt'] = "Delete"; +$wb['filter_txt'] = "Filter"; +$wb['add_new_record_txt'] = "Add new record"; $wb['btn_save_txt'] = "Save"; $wb['btn_cancel_txt'] = "Back"; $wb['top_menu_system'] = 'System'; diff --git a/interface/web/admin/language_edit.php b/interface/web/admin/language_edit.php index ce9f30c68..e4a9dc3c4 100644 --- a/interface/web/admin/language_edit.php +++ b/interface/web/admin/language_edit.php @@ -56,9 +56,9 @@ if(isset($_POST['records']) && is_array($_POST['records'])) { $file_content = "<?php\n"; foreach($_POST['records'] as $key => $val) { $val = stripslashes($val); - $val = str_replace("'",'',$val); - $val = str_replace('"','',$val); - $file_content .= '$wb['."'$key'".'] = '."'$val';\n"; + $val = str_replace('"','\"',$val); + $val = str_replace('$','',$val); + $file_content .= '$wb['."'$key'".'] = "'.$val.'";'."\n"; $msg = 'File saved.'; } $file_content .= "?>\n"; diff --git a/interface/web/mail/lib/lang/en_mail_user.lng b/interface/web/mail/lib/lang/en_mail_user.lng index 741420850..7ce7b52f9 100644 --- a/interface/web/mail/lib/lang/en_mail_user.lng +++ b/interface/web/mail/lib/lang/en_mail_user.lng @@ -36,4 +36,5 @@ $wb["quota_error_value"] = 'Invalid quota value. Allowed values are: 0 for unlim $wb["move_junk_txt"] = 'Move Spam Emails to Junk directory'; $wb["name_txt"] = 'Realname'; $wb["name_optional_txt"] = '(Optional)'; +$wb['autoresponder_active'] = 'Enable the autoresponder'; ?> diff --git a/interface/web/mail/templates/mail_user_autoresponder_edit.htm b/interface/web/mail/templates/mail_user_autoresponder_edit.htm index 5a149047d..7b137fc3c 100644 --- a/interface/web/mail/templates/mail_user_autoresponder_edit.htm +++ b/interface/web/mail/templates/mail_user_autoresponder_edit.htm @@ -1,37 +1,37 @@ -<h2><tmpl_var name="list_head_txt"></h2> -<p><tmpl_var name="list_desc_txt"></p> - -<div class="panel panel_mail_user"> - - <div class="pnl_formsarea"> - <fieldset class="inlineLabels"> - <div class="ctrlHolder"> - <label for="autoresponder_text">{tmpl_var name='autoresponder_text_txt'}</label> - <textarea name="autoresponder_text" id="autoresponder_text" rows='15' cols='30'>{tmpl_var name='autoresponder_text'}</textarea> - </div> - <div class="ctrlHolder"> - <p class="label">{tmpl_var name='autoresponder_txt'}</p> - <div class="multiField"> - <div class="ctrlHolder" style="margin-bottom: 5px;"> - <input type="checkbox" value="y" id="autoresponder" name="autoresponder" onclick="AR_ResetDates();" {tmpl_var name='ar_active'} /> {tmpl_var format='strtoupper' name='page_and_txt'}<br /> - </div> - - <p style="margin-bottom: 3px;"> - <label for="autoresponder_start_date[day]" style="width: 55px;">{tmpl_var name='autoresponder_start_date_txt'}</label> - {tmpl_var name='autoresponder_start_date'} <a href="javascript:AR_SetNow();">now</a></p> - - <label for="password" style="width: 55px;">{tmpl_var name='autoresponder_end_date_txt'}</label> - {tmpl_var name='autoresponder_end_date'} - </div> - </div> - </fieldset> - - <input type="hidden" name="id" value="{tmpl_var name='id'}"> - - <div class="buttonHolder buttons"> - <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','mail/mail_user_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> - <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('mail/mail_user_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> - </div> - </div> - +<h2><tmpl_var name="list_head_txt"></h2> +<p><tmpl_var name="list_desc_txt"></p> + +<div class="panel panel_mail_user"> + + <div class="pnl_formsarea"> + <fieldset class="inlineLabels"> + <div class="ctrlHolder"> + <label for="autoresponder_text">{tmpl_var name='autoresponder_text_txt'}</label> + <textarea name="autoresponder_text" id="autoresponder_text" rows='15' cols='30'>{tmpl_var name='autoresponder_text'}</textarea> + </div> + <div class="ctrlHolder"> + <p class="label">{tmpl_var name='autoresponder_txt'}</p> + <div class="multiField"> + <div class="ctrlHolder" style="margin-bottom: 5px;"> + <input type="checkbox" value="y" id="autoresponder" name="autoresponder" onclick="AR_ResetDates();" {tmpl_var name='ar_active'} /> {tmpl_var name='autoresponder_active'}<br /> + </div> + + <p style="margin-bottom: 3px;"> + <label for="autoresponder_start_date[day]" style="width: 55px;">{tmpl_var name='autoresponder_start_date_txt'}</label> + {tmpl_var name='autoresponder_start_date'} <a href="javascript:AR_SetNow();">now</a></p> + + <label for="password" style="width: 55px;">{tmpl_var name='autoresponder_end_date_txt'}</label> + {tmpl_var name='autoresponder_end_date'} + </div> + </div> + </fieldset> + + <input type="hidden" name="id" value="{tmpl_var name='id'}"> + + <div class="buttonHolder buttons"> + <button class="positive iconstxt icoPositive" type="button" value="{tmpl_var name='btn_save_txt'}" onClick="submitForm('pageForm','mail/mail_user_edit.php');"><span>{tmpl_var name='btn_save_txt'}</span></button> + <button class="negative iconstxt icoNegative" type="button" value="{tmpl_var name='btn_cancel_txt'}" onClick="loadContent('mail/mail_user_list.php');"><span>{tmpl_var name='btn_cancel_txt'}</span></button> + </div> + </div> + </div> \ No newline at end of file diff --git a/interface/web/sites/form/web_aliasdomain.tform.php b/interface/web/sites/form/web_aliasdomain.tform.php index e4b8250cc..ff11da53d 100644 --- a/interface/web/sites/form/web_aliasdomain.tform.php +++ b/interface/web/sites/form/web_aliasdomain.tform.php @@ -112,7 +112,7 @@ $form["tabs"]['domain'] = array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@', + 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@', 'errmsg'=> 'redirect_error_regex'), ), 'default' => '', diff --git a/interface/web/sites/form/web_domain.tform.php b/interface/web/sites/form/web_domain.tform.php index 1d79412bf..7b0535249 100644 --- a/interface/web/sites/form/web_domain.tform.php +++ b/interface/web/sites/form/web_domain.tform.php @@ -224,7 +224,7 @@ $form["tabs"]['redirect'] = array ( 'redirect_path' => array ( 'datatype' => 'VARCHAR', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@', + 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\,\-\+\?]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@', 'errmsg'=> 'redirect_error_regex'), ), 'formtype' => 'TEXT', diff --git a/interface/web/sites/form/web_subdomain.tform.php b/interface/web/sites/form/web_subdomain.tform.php index 2f04f98f7..041638729 100644 --- a/interface/web/sites/form/web_subdomain.tform.php +++ b/interface/web/sites/form/web_subdomain.tform.php @@ -112,7 +112,7 @@ $form["tabs"]['domain'] = array ( 'datatype' => 'VARCHAR', 'formtype' => 'TEXT', 'validators' => array ( 0 => array ( 'type' => 'REGEX', - 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@', + 'regex' => '@^(([.]{0})|(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.\-\,\+\?]*(\?\S+)?)?)?)|(/[\w/_\.\-]{1,255}/))$@', 'errmsg'=> 'redirect_error_regex'), ), 'default' => '', -- GitLab