Commit 39981b72 authored by Till Brehm's avatar Till Brehm
Browse files

Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1

parents 0d35fef9 3bd0d086
......@@ -585,7 +585,7 @@ class installer_base {
$this->warning('Unable to set rights of user in master database: '.$value['db']."\n Query: ".$query."\n Error: ".$this->dbmaster->errorMessage);
}
$query = "GRANT SELECT, UPDATE (`ssl_request`, `ssl_cert`, `ssl_action`, `ssl_key`) ON ?? TO ?@?";
$query = "GRANT SELECT, UPDATE (`ssl`, `ssl_letsencrypt`, `ssl_request`, `ssl_cert`, `ssl_action`, `ssl_key`) ON ?? TO ?@?";
if ($verbose){
echo $query ."\n";
}
......
......@@ -302,7 +302,11 @@ class functions {
if($encode == true) {
if(function_exists('idn_to_ascii')) {
$domain = idn_to_ascii($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
if(defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46') && constant('IDNA_NONTRANSITIONAL_TO_ASCII')) {
$domain = idn_to_ascii($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
} else {
$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>
......@@ -319,7 +323,11 @@ class functions {
}
} else {
if(function_exists('idn_to_utf8')) {
$domain = idn_to_utf8($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
if(defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46') && constant('IDNA_NONTRANSITIONAL_TO_ASCII')) {
$domain = idn_to_utf8($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
} else {
$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>
......
......@@ -354,7 +354,11 @@ class functions {
if($encode == true) {
if(function_exists('idn_to_ascii')) {
$domain = idn_to_ascii($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
if(defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46') && constant('IDNA_NONTRANSITIONAL_TO_ASCII')) {
$domain = idn_to_ascii($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
} else {
$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>
......@@ -371,7 +375,11 @@ class functions {
}
} else {
if(function_exists('idn_to_utf8')) {
$domain = idn_to_utf8($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
if(defined('IDNA_NONTRANSITIONAL_TO_ASCII') && defined('INTL_IDNA_VARIANT_UTS46') && constant('IDNA_NONTRANSITIONAL_TO_ASCII')) {
$domain = idn_to_utf8($domain, IDNA_NONTRANSITIONAL_TO_ASCII, INTL_IDNA_VARIANT_UTS46);
} else {
$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>
......
......@@ -890,10 +890,10 @@ class apache2_plugin {
$primitive_root = $df_output[1];
if($file_system == 'xfs') {
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
exec("xfs_quota -x -c 'limit -u bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
// xfs only supports timers globally, not per user.
exec("xfs_quota -x -c 'timer -bir -i 604800'");
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
unset($project_uid, $username_position, $xfs_projects);
unset($primitive_root, $df_output, $mb_hard, $mb_soft);
......
......@@ -145,10 +145,10 @@ class cron_plugin {
exec('setquota -T -u '.$username.' 604800 604800 -a &> /dev/null');
} elseif ($file_system == 'xfs') {
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
exec("xfs_quota -x -c 'limit -u bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
// xfs only supports timers globally, not per user.
exec("xfs_quota -x -c 'timer -bir -i 604800'");
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
unset($project_uid, $username_position, $xfs_projects);
unset($primitive_root, $df_output, $mb_hard, $mb_soft);
......
......@@ -748,10 +748,10 @@ class nginx_plugin {
$primitive_root = $df_output[1];
if($file_system == 'xfs') {
exec("xfs_quota -x -c 'limit -g bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
exec("xfs_quota -x -c 'limit -u bsoft=$mb_soft" . 'm'. " bhard=$mb_hard" . 'm'. " $username' $primitive_root");
// xfs only supports timers globally, not per user.
exec("xfs_quota -x -c 'timer -bir -i 604800'");
exec("xfs_quota -x -c 'timer -bir -i 604800' $primitive_root");
unset($project_uid, $username_position, $xfs_projects);
unset($primitive_root, $df_output, $mb_hard, $mb_soft);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment