From 7b13aafce88656dc96b4ae03d27e97ed05791ec5 Mon Sep 17 00:00:00 2001 From: Herman van Rink Date: Tue, 4 Dec 2018 16:26:11 +0100 Subject: [PATCH] Pass a client_id to getDataRecord() to not override a session in loadUserProfile() --- interface/lib/classes/remoting.inc.php | 2 +- interface/lib/classes/remoting_lib.inc.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php index 8522ebc6fd..61e92389a2 100644 --- a/interface/lib/classes/remoting.inc.php +++ b/interface/lib/classes/remoting.inc.php @@ -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) { diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php index a5a5d0c31c..ec04254dd3 100644 --- a/interface/lib/classes/remoting_lib.inc.php +++ b/interface/lib/classes/remoting_lib.inc.php @@ -225,10 +225,10 @@ class remoting_lib extends tform_base { return $sql; } - function getDataRecord($primary_id) { + function getDataRecord($primary_id, $client_id) { global $app; $escape = '`'; - $this->loadUserProfile(); + $this->loadUserProfile($client_id); if(@is_numeric($primary_id)) { if($primary_id > 0) { // Return a single record -- GitLab