Skip to content

Commit 45629b1

Browse files
author
mcramer
committed
Fixed: remoting handling of clients/resellers added/updated
1 parent 2e97b28 commit 45629b1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1063,7 +1063,8 @@ public function client_add($session_id, $reseller_id, $params)
10631063
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
10641064
return false;
10651065
}
1066-
$affected_rows = $this->klientadd('../client/form/' . ($reseller_id ? 'reseller' : 'client') . '.tform.php',$reseller_id, $params);
1066+
if(!isset($params['parent_client_id']) || $params['parent_client_id'] == 0) $params['parent_client_id'] = $reseller_id;
1067+
$affected_rows = $this->klientadd('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] > 0 ? 'reseller' : 'client') . '.tform.php',$reseller_id, $params);
10671068
return $affected_rows;
10681069

10691070
}
@@ -1077,7 +1078,8 @@ public function client_update($session_id, $client_id, $reseller_id, $params)
10771078
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
10781079
return false;
10791080
}
1080-
$affected_rows = $this->updateQuery('../client/form/' . ($reseller_id ? 'reseller' : 'client') . '.tform.php', $reseller_id, $client_id, $params);
1081+
if(!isset($params['parent_client_id']) || $params['parent_client_id'] == 0) $params['parent_client_id'] = $reseller_id;
1082+
$affected_rows = $this->updateQuery('../client/form/' . (isset($params['limit_client']) && $params['limit_client'] > 0 ? 'reseller' : 'client') . '.tform.php', $reseller_id, $client_id, $params);
10811083

10821084
$app->remoting_lib->ispconfig_sysuser_update($params,$client_id);
10831085

0 commit comments

Comments
 (0)