From c1418f4ae00a1a6d3bbb3d4ed7e12305c53008c8 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Wed, 21 Aug 2013 14:06:20 -0400
Subject: [PATCH] - Implemented: FS#3108 - Make remoting modular
---
interface/lib/classes/remoting_lib.inc.php | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index bcfd619..0c40a86 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -133,6 +133,8 @@
}
}
unset($form);
+
+ $this->dateformat = $app->lng('conf_format_dateshort');
return true;
}
@@ -783,7 +785,7 @@
} else {
if($primary_id != 0) {
// update client permissions only if client_id > 0
- if($this->formDef['auth'] == 'yes' && $this->client_id > 0) {
+ if($this->formDef['auth'] == 'yes' && $this->client_id > 0 && $this->sys_userid > 0 && $this->sys_default_group > 0) {
$sql_update .= '`sys_userid` = '.$this->sys_userid.', ';
$sql_update .= '`sys_groupid` = '.$this->sys_default_group.', ';
}
@@ -817,7 +819,8 @@
if(@is_numeric($primary_id)) {
$sql = "SELECT * FROM ".$escape.$this->formDef['db_table'].$escape." WHERE ".$this->formDef['db_table_idx']." = ".$primary_id;
return $app->db->queryOneRecord($sql);
- } elseif (@is_array($primary_id)) {
+ } elseif (@is_array($primary_id) || @is_object($primary_id)) {
+ if(@is_object($primary_id)) $primary_id = get_object_vars($primary_id); // do not use cast (array)xxx because it returns private and protected properties!
$sql_offset = 0;
$sql_limit = 0;
$sql_where = '';
--
Gitblit v1.9.1