Skip to content

Commit 1825684

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents c53767c + fcfeb80 commit 1825684

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+405
-64
lines changed

install/tpl/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Overriding templates
2+
--------------------
3+
4+
Manually altered versions have to be put into `server/conf-custom/install/`, e.g. `/usr/local/ispconfig/server/conf-custom/install/`

interface/lib/classes/quota_lib.inc.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,19 @@ public function get_quota_data($clientid = null, $readable = true) {
5454
if($used_ratio >= 1) $sites[$i]['display_colour'] = '#cc0000';
5555

5656
if($sites[$i]['used'] > 1024) {
57-
$sites[$i]['used'] = round($sites[$i]['used'] / 1024, 2).' MB';
57+
$sites[$i]['used'] = round($sites[$i]['used'] / 1024, 1).' MB';
5858
} else {
5959
if ($sites[$i]['used'] != '') $sites[$i]['used'] .= ' KB';
6060
}
6161

6262
if($sites[$i]['soft'] > 1024) {
63-
$sites[$i]['soft'] = round($sites[$i]['soft'] / 1024, 2).' MB';
63+
$sites[$i]['soft'] = round($sites[$i]['soft'] / 1024, 1).' MB';
6464
} else {
6565
$sites[$i]['soft'] .= ' KB';
6666
}
6767

6868
if($sites[$i]['hard'] > 1024) {
69-
$sites[$i]['hard'] = round($sites[$i]['hard'] / 1024, 2).' MB';
69+
$sites[$i]['hard'] = round($sites[$i]['hard'] / 1024, 1).' MB';
7070
} else {
7171
$sites[$i]['hard'] .= ' KB';
7272
}
@@ -268,14 +268,14 @@ public function get_mailquota_data($clientid = null, $readable = true) {
268268
if($emails[$i]['quota'] == 0){
269269
$emails[$i]['quota'] = $app->lng('unlimited');
270270
} else {
271-
$emails[$i]['quota'] = round($emails[$i]['quota'] / 1048576, 4).' MB';
271+
$emails[$i]['quota'] = round($emails[$i]['quota'] / 1048576, 1).' MB';
272272
}
273273

274274

275275
if($emails[$i]['used'] < 1544000) {
276-
$emails[$i]['used'] = round($emails[$i]['used'] / 1024, 4).' KB';
276+
$emails[$i]['used'] = round($emails[$i]['used'] / 1024, 1).' KB';
277277
} else {
278-
$emails[$i]['used'] = round($emails[$i]['used'] / 1048576, 4).' MB';
278+
$emails[$i]['used'] = round($emails[$i]['used'] / 1048576, 1).' MB';
279279
}
280280
}
281281
}
@@ -334,9 +334,9 @@ public function get_databasequota_data($clientid = null, $readable = true) {
334334

335335

336336
if($databases[$i]['used'] < 1544000) {
337-
$databases[$i]['used'] = round($databases[$i]['used'] / 1024, 4).' KB';
337+
$databases[$i]['used'] = round($databases[$i]['used'] / 1024, 1).' KB';
338338
} else {
339-
$databases[$i]['used'] = round($databases[$i]['used'] / 1048576, 4).' MB';
339+
$databases[$i]['used'] = round($databases[$i]['used'] / 1048576, 1).' MB';
340340
}
341341
}
342342
}

interface/lib/classes/remote.d/domains.inc.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,16 @@ public function domains_domain_add($session_id, $client_id, $params)
6565
return $this->insertQuery('../client/form/domain.tform.php', $client_id, $params);
6666
}
6767

68+
//* Update a record
69+
public function domains_domain_update($session_id, $client_id, $primary_id, $params)
70+
{
71+
if(!$this->checkPerm($session_id, 'domains_domain_update')) {
72+
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
73+
return false;
74+
}
75+
return $this->updateQuery('../client/form/domain.tform.php', $client_id, $primary_id, $params);
76+
}
77+
6878
//* Delete a record
6979
public function domains_domain_delete($session_id, $primary_id)
7080
{

interface/lib/classes/remoting.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ protected function updateQueryPrepare($formdef_file, $client_id, $primary_id, $p
407407
$app->remoting_lib->loadFormDef($formdef_file);
408408

409409
//* get old record and merge with params, so only new values have to be set in $params
410-
$old_rec = $app->remoting_lib->getDataRecord($primary_id);
410+
$old_rec = $app->remoting_lib->getDataRecord($primary_id, $client_id);
411411

412412
foreach ($app->remoting_lib->formDef['fields'] as $fieldName => $fieldConf)
413413
{

interface/lib/classes/remoting_lib.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ function getDeleteSQL($primary_id) {
225225
return $sql;
226226
}
227227

228-
function getDataRecord($primary_id) {
228+
function getDataRecord($primary_id, $client_id = 0) {
229229
global $app;
230230
$escape = '`';
231-
$this->loadUserProfile();
231+
$this->loadUserProfile($client_id);
232232
if(@is_numeric($primary_id)) {
233233
if($primary_id > 0) {
234234
// Return a single record

interface/lib/classes/tform_base.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1453,7 +1453,7 @@ protected function _getSQL($record, $tab, $action = 'INSERT', $primary_id = 0, $
14531453
} else {
14541454
if($this->formDef['auth'] == 'yes') {
14551455
if($primary_id != 0) {
1456-
if($api == true && $_SESSION["s"]["user"]["client_id"] > 0 && $_SESSION["s"]["user"]["iserid"] > 0 && $_SESSION["s"]["user"]["default_group"] > 0) {
1456+
if($api == true && $_SESSION["s"]["user"]["client_id"] > 0 && $_SESSION["s"]["user"]["userid"] > 0 && $_SESSION["s"]["user"]["default_group"] > 0) {
14571457
$sql_update .= '`sys_userid` = '.$this->sys_userid.', ';
14581458
$sql_update .= '`sys_groupid` = '.$this->sys_default_group.', ';
14591459
}

interface/lib/classes/validate_autoresponder.inc.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ function end_date($field_name, $field_value, $validator)
5252
//$start_date = $app->tform_actions->dataRecord['autoresponder_start_date'];
5353

5454
// Parse date
55-
$start_date_array = date_parse_from_format($app->lng('conf_format_datetime'),$start_date);
56-
$end_date_array = date_parse_from_format($app->lng('conf_format_datetime'),$field_value);
55+
$datetimeformat = (isset($app->remoting_lib) ? $app->remoting_lib->datetimeformat : $app->tform->datetimeformat);
56+
$start_date_array = date_parse_from_format($datetimeformat,$start_date);
57+
$end_date_array = date_parse_from_format($datetimeformat,$field_value);
5758

5859
//calculate timestamps
5960
$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']);

interface/web/admin/language_edit.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
if(!preg_match("/^[a-z]+$/i", $lang)) die('unallowed characters in language name.');
5151
if(!preg_match("/^[a-z_]+$/i", $module)) die('unallowed characters in module name.');
52-
if(!preg_match("/^[a-z\._]+$/i", $lang_file)) die('unallowed characters in language file name.');
52+
if(!preg_match("/^[a-z\._]+$/i", $lang_file) || strpos($lang_file,'..') !== false || substr($lang_file,-4) != '.lng') die('unallowed characters in language file name.');
5353

5454
$msg = '';
5555

interface/web/admin/lib/lang/ar_server_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,5 @@ $wb['log_retention_txt'] = 'Log retention (days)';
293293
$wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0';
294294
$wb['php_default_name_txt'] = 'Description Default PHP-Version';
295295
$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty';
296+
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
296297
?>

interface/web/admin/lib/lang/bg_server_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,4 +293,5 @@ $wb['log_retention_txt'] = 'Log retention (days)';
293293
$wb['log_retention_error_ispositive'] = 'Log retention must be a number > 0';
294294
$wb['php_default_name_txt'] = 'Description Default PHP-Version';
295295
$wb['php_default_name_error_empty'] = 'Description Default PHP-Version must not be empty';
296+
$wb['error_mailbox_message_size_txt'] = 'Mailbox size must be larger or equal to message size';
296297
?>

0 commit comments

Comments
 (0)