From 2d2fd172e1548dd24e1719accd0b856cff6a31a0 Mon Sep 17 00:00:00 2001
From: Falko Timme <ft@falkotimme.com>
Date: Fri, 18 Oct 2013 12:20:13 -0400
Subject: [PATCH] - Added funtion to convert currency formatted numbers back to floating numbers. - Improved getSearchSQL() function so that users can use their native date format so search for dates in lists.

---
 interface/lib/classes/remoting_lib.inc.php |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index bcfd619..7ecc663 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;
         }
@@ -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