Skip to content

Commit 0be3d1e

Browse files
author
Till Brehm
committed
Merge branch 'misc-updates' into 'develop'
Misc updates See merge request ispconfig/ispconfig3!1835
2 parents 55c0bac + 49aca85 commit 0be3d1e

File tree

31 files changed

+81
-30
lines changed

31 files changed

+81
-30
lines changed

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

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -113,20 +113,20 @@ public function client_get_id($session_id, $sys_userid)
113113
}
114114

115115
}
116-
116+
117117
//* Get the contact details to send a email like email address, name, etc.
118118
public function client_get_emailcontact($session_id, $client_id) {
119119
global $app;
120-
120+
121121
if(!$this->checkPerm($session_id, 'client_get_emailcontact')) {
122122
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
123123
return false;
124124
}
125-
125+
126126
$client_id = $app->functions->intval($client_id);
127127

128128
$rec = $app->db->queryOneRecord("SELECT company_name,contact_name,gender,email,language FROM client WHERE client_id = ?", $client_id);
129-
129+
130130
if(is_array($rec)) {
131131
return $rec;
132132
} else {
@@ -159,7 +159,7 @@ public function client_get_groupid($session_id, $client_id)
159159
public function client_add($session_id, $reseller_id, $params)
160160
{
161161
global $app;
162-
162+
163163
if (!$this->checkPerm($session_id, 'client_add'))
164164
{
165165
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
@@ -198,7 +198,7 @@ public function client_update($session_id, $client_id, $reseller_id, $params)
198198
$app->uses('remoting_lib');
199199
$app->remoting_lib->loadFormDef('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] != 0 ? 'reseller' : 'client') . '.tform.php');
200200
$old_rec = $app->remoting_lib->getDataRecord($client_id);
201-
201+
202202
//* merge old record with params, so only new values have to be set in $params
203203
$params = $app->functions->array_merge($old_rec,$params);
204204

@@ -218,7 +218,7 @@ public function client_update($session_id, $client_id, $reseller_id, $params)
218218
}
219219
}
220220

221-
// we need the previuos templates assigned here
221+
// we need the previous templates assigned here
222222
$this->oldTemplatesAssigned = $app->db->queryAllRecords('SELECT * FROM `client_template_assigned` WHERE `client_id` = ?', $client_id);
223223
if(!is_array($this->oldTemplatesAssigned) || count($this->oldTemplatesAssigned) < 1) {
224224
// check previous type of storing templates
@@ -243,7 +243,7 @@ public function client_update($session_id, $client_id, $reseller_id, $params)
243243
$affected_rows = $this->updateQuery('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] != 0 ? 'reseller' : 'client') . '.tform.php', $reseller_id, $client_id, $params, 'client:' . ($reseller_id ? 'reseller' : 'client') . ':on_after_update');
244244

245245
$app->remoting_lib->ispconfig_sysuser_update($params, $client_id);
246-
246+
247247
// if canceled
248248
if ($params['canceled']) {
249249
$result = $app->functions->func_client_cancel($client_id, $params['canceled']);
@@ -482,7 +482,7 @@ public function client_get_by_username($session_id, $username) {
482482
return false;
483483
}
484484
}
485-
485+
486486
public function client_get_by_customer_no($session_id, $customer_no) {
487487
global $app;
488488
if(!$this->checkPerm($session_id, 'client_get_by_customer_no')) {
@@ -573,16 +573,16 @@ public function client_templates_get_all($session_id) {
573573
$result = $app->db->queryAllRecords($sql);
574574
return $result;
575575
}
576-
576+
577577
public function client_login_get($session_id,$username,$password,$remote_ip = '') {
578578
global $app;
579-
579+
580580
//* Check permissions
581581
if(!$this->checkPerm($session_id, 'client_get')) {
582582
throw new SoapFault('permission_denied', 'You do not have the permissions to access this function.');
583583
return false;
584584
}
585-
585+
586586
//* Check username and password
587587
if(!preg_match("/^[\w\.\-\_\@]{1,128}$/", $username)) {
588588
throw new SoapFault('user_regex_error', 'Username contains invalid characters.');
@@ -592,21 +592,21 @@ public function client_login_get($session_id,$username,$password,$remote_ip = ''
592592
throw new SoapFault('password_length_error', 'Invalid password length or no password provided.');
593593
return false;
594594
}
595-
595+
596596
//* Check failed logins
597597
$sql = "SELECT * FROM `attempts_login` WHERE `ip`= ? AND `login_time` > (NOW() - INTERVAL 1 MINUTE) LIMIT 1";
598598
$alreadyfailed = $app->db->queryOneRecord($sql, $remote_ip);
599-
599+
600600
//* too many failedlogins
601601
if($alreadyfailed['times'] > 5) {
602602
throw new SoapFault('error_user_too_many_logins', 'Too many failed logins.');
603603
return false;
604604
}
605-
606-
605+
606+
607607
//*Set variables
608608
$returnval == false;
609-
609+
610610
if(strstr($username,'@')) {
611611
// Check against client table
612612
$sql = "SELECT * FROM client WHERE email = ?";
@@ -628,15 +628,15 @@ public function client_login_get($session_id,$username,$password,$remote_ip = ''
628628
}
629629
}
630630
}
631-
631+
632632
if(is_array($user)) {
633633
$returnval = array( 'username' => $user['username'],
634634
'type' => 'user',
635635
'client_id' => $user['client_id'],
636636
'language' => $user['language'],
637637
'country' => $user['country']);
638638
}
639-
639+
640640
} else {
641641
// Check against sys_user table
642642
$sql = "SELECT * FROM sys_user WHERE username = ?";
@@ -658,7 +658,7 @@ public function client_login_get($session_id,$username,$password,$remote_ip = ''
658658
}
659659
}
660660
}
661-
661+
662662
if(is_array($user)) {
663663
$returnval = array( 'username' => $user['username'],
664664
'type' => $user['typ'],
@@ -669,7 +669,7 @@ public function client_login_get($session_id,$username,$password,$remote_ip = ''
669669
throw new SoapFault('login_failed', 'Login failed.');
670670
}
671671
}
672-
672+
673673
//* Log failed login attempts
674674
if($user === false) {
675675
if(!$alreadyfailed['times'] ) {
@@ -682,10 +682,10 @@ public function client_login_get($session_id,$username,$password,$remote_ip = ''
682682
$app->db->query($sql, $remote_ip);
683683
}
684684
}
685-
685+
686686
return $returnval;
687687
}
688-
688+
689689
public function client_get_by_groupid($session_id, $group_id)
690690
{
691691
global $app;

interface/lib/lang/ar.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup';
184184
$wb['datalog_status_i_dns_template'] = 'Create DNS template';
185185
$wb['datalog_status_u_dns_template'] = 'Update DNS template';
186186
$wb['datalog_status_d_dns_template'] = 'Delete DNS template';
187+
$wb['datalog_status_i_sys_group'] = 'Create new client group';
188+
$wb['datalog_status_u_sys_ini'] = 'Update main config';
187189
?>

interface/lib/lang/bg.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup';
184184
$wb['datalog_status_i_dns_template'] = 'Create DNS template';
185185
$wb['datalog_status_u_dns_template'] = 'Update DNS template';
186186
$wb['datalog_status_d_dns_template'] = 'Delete DNS template';
187+
$wb['datalog_status_i_sys_group'] = 'Create new client group';
188+
$wb['datalog_status_u_sys_ini'] = 'Update main config';
187189
?>

interface/lib/lang/br.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup';
184184
$wb['datalog_status_i_dns_template'] = 'Create DNS template';
185185
$wb['datalog_status_u_dns_template'] = 'Update DNS template';
186186
$wb['datalog_status_d_dns_template'] = 'Delete DNS template';
187+
$wb['datalog_status_i_sys_group'] = 'Create new client group';
188+
$wb['datalog_status_u_sys_ini'] = 'Update main config';
187189
?>

interface/lib/lang/ca.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup';
184184
$wb['datalog_status_i_dns_template'] = 'Create DNS template';
185185
$wb['datalog_status_u_dns_template'] = 'Update DNS template';
186186
$wb['datalog_status_d_dns_template'] = 'Delete DNS template';
187+
$wb['datalog_status_i_sys_group'] = 'Create new client group';
188+
$wb['datalog_status_u_sys_ini'] = 'Update main config';
187189
?>

interface/lib/lang/cn.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,4 +185,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup';
185185
$wb['datalog_status_i_dns_template'] = 'Create DNS template';
186186
$wb['datalog_status_u_dns_template'] = 'Update DNS template';
187187
$wb['datalog_status_d_dns_template'] = 'Delete DNS template';
188+
$wb['datalog_status_i_sys_group'] = 'Create new client group';
189+
$wb['datalog_status_u_sys_ini'] = 'Update main config';
188190
?>

interface/lib/lang/cz.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup';
184184
$wb['datalog_status_i_dns_template'] = 'Create DNS template';
185185
$wb['datalog_status_u_dns_template'] = 'Update DNS template';
186186
$wb['datalog_status_d_dns_template'] = 'Delete DNS template';
187+
$wb['datalog_status_i_sys_group'] = 'Create new client group';
188+
$wb['datalog_status_u_sys_ini'] = 'Update main config';
187189
?>

interface/lib/lang/de.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Website-Backup löschen';
184184
$wb['datalog_status_i_dns_template'] = 'Neue DNS-Vorlage erstellen';
185185
$wb['datalog_status_u_dns_template'] = 'DNS-Vorlage aktualisieren';
186186
$wb['datalog_status_d_dns_template'] = 'DNS-Vorlage löschen';
187+
$wb['datalog_status_i_sys_group'] = 'Neue Gruppe für Kunde erstellen';
188+
$wb['datalog_status_u_sys_ini'] = 'Aktualisiere Hauptkonfiguration';
187189
?>

interface/lib/lang/dk.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup';
184184
$wb['datalog_status_i_dns_template'] = 'Create DNS template';
185185
$wb['datalog_status_u_dns_template'] = 'Update DNS template';
186186
$wb['datalog_status_d_dns_template'] = 'Delete DNS template';
187+
$wb['datalog_status_i_sys_group'] = 'Create new client group';
188+
$wb['datalog_status_u_sys_ini'] = 'Update main config';
187189
?>

interface/lib/lang/el.lng

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,4 +184,6 @@ $wb['datalog_status_d_web_backup'] = 'Delete website backup';
184184
$wb['datalog_status_i_dns_template'] = 'Create DNS template';
185185
$wb['datalog_status_u_dns_template'] = 'Update DNS template';
186186
$wb['datalog_status_d_dns_template'] = 'Delete DNS template';
187+
$wb['datalog_status_i_sys_group'] = 'Create new client group';
188+
$wb['datalog_status_u_sys_ini'] = 'Update main config';
187189
?>

0 commit comments

Comments
 (0)