Commit 18256840 authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch 'stable-3.1'

parents c53767c4 fcfeb806
Overriding templates
--------------------
Manually altered versions have to be put into `server/conf-custom/install/`, e.g. `/usr/local/ispconfig/server/conf-custom/install/`
......@@ -54,19 +54,19 @@ class quota_lib {
if($used_ratio >= 1) $sites[$i]['display_colour'] = '#cc0000';
if($sites[$i]['used'] > 1024) {
$sites[$i]['used'] = round($sites[$i]['used'] / 1024, 2).' MB';
$sites[$i]['used'] = round($sites[$i]['used'] / 1024, 1).' MB';
} else {
if ($sites[$i]['used'] != '') $sites[$i]['used'] .= ' KB';
}
if($sites[$i]['soft'] > 1024) {
$sites[$i]['soft'] = round($sites[$i]['soft'] / 1024, 2).' MB';
$sites[$i]['soft'] = round($sites[$i]['soft'] / 1024, 1).' MB';
} else {
$sites[$i]['soft'] .= ' KB';
}
if($sites[$i]['hard'] > 1024) {
$sites[$i]['hard'] = round($sites[$i]['hard'] / 1024, 2).' MB';
$sites[$i]['hard'] = round($sites[$i]['hard'] / 1024, 1).' MB';
} else {
$sites[$i]['hard'] .= ' KB';
}
......@@ -268,14 +268,14 @@ class quota_lib {
if($emails[$i]['quota'] == 0){
$emails[$i]['quota'] = $app->lng('unlimited');
} else {
$emails[$i]['quota'] = round($emails[$i]['quota'] / 1048576, 4).' MB';
$emails[$i]['quota'] = round($emails[$i]['quota'] / 1048576, 1).' MB';
}
if($emails[$i]['used'] < 1544000) {
$emails[$i]['used'] = round($emails[$i]['used'] / 1024, 4).' KB';
$emails[$i]['used'] = round($emails[$i]['used'] / 1024, 1).' KB';
} else {
$emails[$i]['used'] = round($emails[$i]['used'] / 1048576, 4).' MB';
$emails[$i]['used'] = round($emails[$i]['used'] / 1048576, 1).' MB';
}
}
}
......@@ -334,9 +334,9 @@ class quota_lib {
if($databases[$i]['used'] < 1544000) {
$databases[$i]['used'] = round($databases[$i]['used'] / 1024, 4).' KB';
$databases[$i]['used'] = round($databases[$i]['used'] / 1024, 1).' KB';
} else {
$databases[$i]['used'] = round($databases[$i]['used'] / 1048576, 4).' MB';
$databases[$i]['used'] = round($databases[$i]['used'] / 1048576, 1).' MB';
}
}
}
......
......@@ -65,6 +65,16 @@ class remoting_domains extends remoting {
return $this->insertQuery('../client/form/domain.tform.php', $client_id, $params);
}
//* Update a record
public function domains_domain_update($session_id, $client_id, $primary_id, $params)
{
if(!$this->checkPerm($session_id, 'domains_domain_update')) {
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
return false;
}
return $this->updateQuery('../client/form/domain.tform.php', $client_id, $primary_id, $params);
}
//* Delete a record
public function domains_domain_delete($session_id, $primary_id)
{
......
......@@ -407,7 +407,7 @@ class remoting {
$app->remoting_lib->loadFormDef($formdef_file);
//* get old record and merge with params, so only new values have to be set in $params
$old_rec = $app->remoting_lib->getDataRecord($primary_id);
$old_rec = $app->remoting_lib->getDataRecord($primary_id, $client_id);
foreach ($app->remoting_lib->formDef['fields'] as $fieldName => $fieldConf)
{
......
......@@ -225,10 +225,10 @@ class remoting_lib extends tform_base {
return $sql;
}
function getDataRecord($primary_id) {
function getDataRecord($primary_id, $client_id = 0) {
global $app;
$escape = '`';
$this->loadUserProfile();
$this->loadUserProfile($client_id);
if(@is_numeric($primary_id)) {
if($primary_id > 0) {
// Return a single record
......
......@@ -1453,7 +1453,7 @@ class tform_base {
} else {
if($this->formDef['auth'] == 'yes') {
if($primary_id != 0) {
if($api == true && $_SESSION["s"]["user"]["client_id"] > 0 && $_SESSION["s"]["user"]["iserid"] > 0 && $_SESSION["s"]["user"]["default_group"] > 0) {
if($api == true && $_SESSION["s"]["user"]["client_id"] > 0 && $_SESSION["s"]["user"]["userid"] > 0 && $_SESSION["s"]["user"]["default_group"] > 0) {
$sql_update .= '`sys_userid` = '.$this->sys_userid.', ';
$sql_update .= '`sys_groupid` = '.$this->sys_default_group.', ';
}
......
......@@ -52,8 +52,9 @@ class validate_autoresponder extends validate_datetime
//$start_date = $app->tform_actions->dataRecord['autoresponder_start_date'];
// Parse date
$start_date_array = date_parse_from_format($app->lng('conf_format_datetime'),$start_date);
$end_date_array = date_parse_from_format($app->lng('conf_format_datetime'),$field_value);
$datetimeformat = (isset($app->remoting_lib) ? $app->remoting_lib->datetimeformat : $app->tform->datetimeformat);
$start_date_array = date_parse_from_format($datetimeformat,$start_date);
$end_date_array = date_parse_from_format($datetimeformat,$field_value);
//calculate timestamps
$start_date_tstamp = mktime($start_date_array['hour'], $start_date_array['minute'], $start_date_array['second'], $start_date_array['month'], $start_date_array['day'], $start_date_array['year']);
......
......@@ -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 = '';
......
......@@ -293,4 +293,5 @@ $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';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
......@@ -293,4 +293,5 @@ $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';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
......@@ -292,4 +292,5 @@ $wb['logging_desc_txt'] = 'Use Tools > Resync to apply changes to existing sites
$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['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
......@@ -293,4 +293,5 @@ $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';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
......@@ -293,4 +293,5 @@ $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';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
......@@ -302,4 +302,5 @@ $wb['php_default_name_error_empty'] = 'Beschreibung Standard PHP ist leer.';
$wb['content_filter_txt'] = 'Content-Filter';
$wb['rspamd_url_txt'] = 'Rspamd-URL';
$wb['rspamd_user_txt'] = 'Rspamd-Benutzer';
$wb['rspamd_password_txt'] = 'Rspamd-Passwort';
\ No newline at end of file
$wb['rspamd_password_txt'] = 'Rspamd-Passwort';
$wb['error_mailbox_message_size_txt'] = 'Mailboxgröße muss gleich oder größer als max. Nachrichtengröße sein.';
......@@ -293,4 +293,5 @@ $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';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
......@@ -293,4 +293,5 @@ $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';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
......@@ -305,4 +305,4 @@ $wb['content_filter_txt'] = 'Content Filter';
$wb['rspamd_url_txt'] = 'Rspamd URL';
$wb['rspamd_user_txt'] = 'Rspamd User';
$wb['rspamd_password_txt'] = 'Rspamd Password';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
......@@ -293,4 +293,5 @@ $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';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
......@@ -293,4 +293,5 @@ $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';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
......@@ -293,4 +293,5 @@ $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';
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
?>
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