Skip to content
......@@ -134,7 +134,7 @@ class tform_base {
$this->module = $module;
$wb = array();
include_once ISPC_ROOT_PATH.'/lib/lang/'.$_SESSION['s']['language'].'.lng';
include_once ISPC_ROOT_PATH.'/lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'.lng';
if(is_array($wb)) $wb_global = $wb;
......@@ -143,7 +143,7 @@ class tform_base {
if(!file_exists($lng_file)) $lng_file = "lib/lang/en_".$this->formDef["name"].".lng";
include $lng_file;
} else {
$lng_file = "../$module/lib/lang/".$_SESSION["s"]["language"]."_".$this->formDef["name"].".lng";
$lng_file = "../$module/lib/lang/".$app->functions->check_language($_SESSION["s"]["language"])."_".$this->formDef["name"].".lng";
if(!file_exists($lng_file)) $lng_file = "../$module/lib/lang/en_".$this->formDef["name"].".lng";
include $lng_file;
}
......
......@@ -298,7 +298,7 @@ class tform_tpl_generator {
function lng_add($lang, $formDef) {
global $go_api, $go_info, $conf;
$lng_file = "lib/lang/".$conf["language"]."_".$formDef['name'].".lng";
$lng_file = "lib/lang/".$app->functions->check_language($conf["language"])."_".$formDef['name'].".lng";
if(is_file($lng_file)) {
include $lng_file;
} else {
......
......@@ -191,7 +191,7 @@ class validate_domain {
/* internal validator function to match regexp */
function _regex_validate($domain_name, $allow_wildcard = false) {
$pattern = '/^' . ($allow_wildcard == true ? '(\*\.)?' : '') . '[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/';
$pattern = '/^' . ($allow_wildcard == true ? '(\*\.)?' : '') . '[\w\.\-]{1,255}\.[a-zA-Z0-9\-]{2,30}$/';
return preg_match($pattern, $domain_name);
}
......
......@@ -71,7 +71,7 @@ class validate_password {
} else if ($points == 1) {
if ($length >= 5 && $length <= 6) {
return 2;
} else if (length >= 7 && length <=10) {
} else if ($length >= 7 && $length <=10) {
return 3;
} else {
return 4;
......
......@@ -145,7 +145,7 @@ $wb['strength_2'] = 'Средний';
$wb['strength_3'] = 'Хороший';
$wb['strength_4'] = 'Стойкий';
$wb['strength_5'] = 'Очень стойкий';
$wb['weak_password_txt'] = 'Выбранный пароль не соответствует требованиям безопасности. Он должен быть как минимум {chars} символов в длину и стойкость \"{strength}\".';
$wb['weak_password_txt'] = 'Выбранный пароль не соответствует требованиям безопасности. Он должен быть как минимум {chars} символов в длину и стойкость \\"{strength}\\".';
$wb['weak_password_length_txt'] = 'Выбранный пароль не соответствует требованиям безопасности. Он должен быть как минимум {chars} символов в длину.';
$wb['security_check1_txt'] = 'Проверка разрешений безопасности:';
$wb['security_check2_txt'] = 'не удалось.';
......
......@@ -395,6 +395,17 @@ $form["tabs"]['server'] = array(
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'log_retention' => array (
'datatype' => 'INTEGER',
'formtype' => 'TEXT',
'validators' => array ( 0 => array ( 'type' => 'ISPOSITIVE',
'errmsg'=> 'log_retention_error_ispositive'),
),
'default' => '30',
'value' => '',
'width' => '4',
'maxlength' => '4'
),
'migration_mode' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
......@@ -814,6 +825,12 @@ $form["tabs"]['web'] = array(
'width' => '40',
'maxlength' => '255'
),
'nginx_enable_pagespeed' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
'value' => array(0 => 'n',1 => 'y')
),
'nginx_vhost_conf_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
......@@ -904,6 +921,12 @@ $form["tabs"]['web'] = array(
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'logging' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
'default' => 'yes',
'value' => array('yes' => 'Yes', 'anon' => 'Anonymize IP', 'no' => 'No')
),
'overtraffic_notify_admin' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
......@@ -1071,6 +1094,24 @@ $form["tabs"]['web'] = array(
'width' => '40',
'maxlength' => '255'
),
'php_default_name' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'Default',
'validators' => array( 0 => array('type' => 'NOTEMPTY',
'errmsg' => 'php_default_name_error_empty'),
),
'filters' => array(
0 => array( 'event' => 'SAVE',
'type' => 'TRIM'),
1 => array( 'event' => 'SAVE',
'type' => 'STRIPTAGS'),
2 => array( 'event' => 'SAVE',
'type' => 'STRIPNL')
),
'width' => '40',
'maxlength' => '255'
),
'php_fpm_init_script' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
......
......@@ -124,6 +124,13 @@ $form["tabs"]['php_name'] = array (
'width' => '40',
'maxlength' => '255'
),
'active' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
//#################################
// ENDE Datenbankfelder
//#################################
......
......@@ -104,7 +104,7 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']);
$app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']);
//* load language file
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_add.lng';
$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_add.lng';
include $lng_file;
$app->tpl->setVar($wb);
......
......@@ -166,7 +166,7 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']);
$app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']);
//* load language file
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_complete.lng';
$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_complete.lng';
include $lng_file;
$app->tpl->setVar($wb);
......
......@@ -49,7 +49,7 @@ $lang_file = $_REQUEST['lang_file'];
if(!preg_match("/^[a-z]+$/i", $lang)) die('unallowed characters in language name.');
if(!preg_match("/^[a-z_]+$/i", $module)) die('unallowed characters in module name.');
if(!preg_match("/^[a-z\._]+$/i", $lang_file)) die('unallowed characters in language file name.');
if(!preg_match("/^[a-z\._]+$/i", $lang_file) || strpos($lang_file,'..') !== false || substr($lang_file,-4) != '.lng') die('unallowed characters in language file name.');
$msg = '';
......@@ -104,7 +104,7 @@ $app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']);
//* load language file
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_edit.lng';
$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_edit.lng';
include $lng_file;
$app->tpl->setVar($wb);
......
......@@ -111,7 +111,7 @@ if(isset($_POST['lng_select']) && $error == '') {
$app->tpl->setVar('msg', $msg);
//* load language file
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_export.lng';
$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_export.lng';
include $lng_file;
$app->tpl->setVar($wb);
......
......@@ -194,7 +194,7 @@ $app->tpl->setVar('_csrf_id',$csrf_token['csrf_id']);
$app->tpl->setVar('_csrf_key',$csrf_token['csrf_key']);
//* load language file
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_import.lng';
$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_import.lng';
include $lng_file;
$app->tpl->setVar($wb);
......
......@@ -97,7 +97,7 @@ $app->tpl->setLoop('records', $language_files_list);
//* load language file
$lng_file = 'lib/lang/'.$_SESSION['s']['language'].'_language_list.lng';
$lng_file = 'lib/lang/'.$app->functions->check_language($_SESSION['s']['language']).'_language_list.lng';
include $lng_file;
$app->tpl->setVar($wb);
......
......@@ -44,4 +44,7 @@ $wb['generate_password_txt'] = 'Generate Password';
$wb['repeat_password_txt'] = 'Repeat Password';
$wb['password_mismatch_txt'] = 'The passwords do not match.';
$wb['password_match_txt'] = 'The passwords do match.';
$wb['remote_access_txt'] = 'Remote Access';
$wb['remote_ips_txt'] = 'Remote Access IPs / Hostnames (separate by , and leave blank for <i>any</i>)';
$wb['remote_user_error_ips'] = 'At least one of the entered ip addresses or hostnames is invalid.';
?>
......@@ -266,7 +266,7 @@ $wb['dkim_strength_txt'] = 'DKIM strength';
$wb['php_ini_check_minutes_txt'] = 'Check php.ini every X minutes for changes';
$wb['php_ini_check_minutes_error_empty'] = 'Please specify a value how often php.ini should be checked for changes.';
$wb['php_ini_check_minutes_info_txt'] = '0 = no check';
$wb['enable_spdy_txt'] = 'Makes SPDY available';
$wb['enable_spdy_txt'] = 'Makes SPDY/HTTP2 available';
$wb['web_settings_txt'] = 'Web Server';
$wb['xmpp_server_txt'] = 'XMPP Server';
$wb['xmpp_use_ipv6_txt'] = 'Use IPv6';
......@@ -283,4 +283,14 @@ $wb['xmpp_port_bosh_txt'] = 'BOSH';
$wb['backup_time_txt'] = 'Backup time';
$wb['skip_le_check_txt'] = 'Skip Lets Encrypt Check';
$wb['migration_mode_txt'] = 'Server Migration Mode';
$wb['nginx_enable_pagespeed_txt'] = 'Makes Pagespeed available';
$wb['backup_tmp_txt'] = 'Backup tmp directory for zip';
$wb['tmpdir_path_error_empty'] = 'tmp-dir Path is empty.';
$wb['tmpdir_path_error_regex'] = 'Invalid tmp-dir path.';
$wb['logging_txt'] = 'Store website access and error logs';
$wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.';
$wb['log_retention_txt'] = 'Log retention (days)';
$wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0';
$wb['php_default_name_txt'] = 'Description Default PHP-Version';
$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -44,4 +44,7 @@ $wb['generate_password_txt'] = 'Generate Password';
$wb['repeat_password_txt'] = 'Repeat Password';
$wb['password_mismatch_txt'] = 'The passwords do not match.';
$wb['password_match_txt'] = 'The passwords do match.';
$wb['remote_access_txt'] = 'Remote Access';
$wb['remote_ips_txt'] = 'Remote Access IPs / Hostnames (separate by , and leave blank for <i>any</i>)';
$wb['remote_user_error_ips'] = 'At least one of the entered ip addresses or hostnames is invalid.';
?>
......@@ -266,7 +266,7 @@ $wb['dkim_strength_txt'] = 'DKIM strength';
$wb['php_ini_check_minutes_txt'] = 'Check php.ini every X minutes for changes';
$wb['php_ini_check_minutes_error_empty'] = 'Please specify a value how often php.ini should be checked for changes.';
$wb['php_ini_check_minutes_info_txt'] = '0 = no check';
$wb['enable_spdy_txt'] = 'Makes SPDY available';
$wb['enable_spdy_txt'] = 'Makes SPDY/HTTP2 available';
$wb['web_settings_txt'] = 'Web Server';
$wb['xmpp_server_txt'] = 'XMPP Server';
$wb['xmpp_use_ipv6_txt'] = 'Use IPv6';
......@@ -283,4 +283,14 @@ $wb['xmpp_port_bosh_txt'] = 'BOSH';
$wb['backup_time_txt'] = 'Backup time';
$wb['skip_le_check_txt'] = 'Skip Lets Encrypt Check';
$wb['migration_mode_txt'] = 'Server Migration Mode';
$wb['nginx_enable_pagespeed_txt'] = 'Makes Pagespeed available';
$wb['backup_tmp_txt'] = 'Backup tmp directory for zip';
$wb['tmpdir_path_error_empty'] = 'tmp-dir Path is empty.';
$wb['tmpdir_path_error_regex'] = 'Invalid tmp-dir path.';
$wb['logging_txt'] = 'Store website access and error logs';
$wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites. For Apache, access and error log can be anonymized. For nginx, only the access log is anonymized, the error log will contain IP addresses.';
$wb['log_retention_txt'] = 'Log retention (days)';
$wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0';
$wb['php_default_name_txt'] = 'Description Default PHP-Version';
$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty';
?>
......@@ -13,4 +13,5 @@ $wb['php_fastcgi_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_init_script_txt'] = 'Path to the PHP-FPM init script';
$wb['php_fpm_ini_dir_txt'] = 'Path to the php.ini directory';
$wb['php_fpm_pool_dir_txt'] = 'Path to the PHP-FPM pool directory';
$wb['active_txt'] = 'Active';
?>
......@@ -26,7 +26,6 @@ $wb['FastCGI'] = 'FastCGI';
$wb['Jailkit'] = 'Jailkit';
$wb['Rescue'] = 'Manutenção';
$wb['Server IP addresses'] = 'Endereço IP do servidor';
$wb['Server IPv4 mapping'] = 'Mapeamento IPv4 do servidor';
$wb['Additional PHP Versions'] = 'Versões adicionais do php';
$wb['Firewall'] = 'Firewall';
$wb['Interface'] = 'Interface';
......