From 864ba9a531618da771ec74b6d48f8449eb2634ac Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Tue, 11 Sep 2012 07:46:04 -0400
Subject: [PATCH] Bugfix: Event notifier not raised

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

diff --git a/interface/lib/classes/remoting.inc.php b/interface/lib/classes/remoting.inc.php
index 1754125..47bb057 100644
--- a/interface/lib/classes/remoting.inc.php
+++ b/interface/lib/classes/remoting.inc.php
@@ -2673,7 +2673,7 @@
     protected function insertQuery($formdef_file, $client_id, $params,$event_identifier = '')
     {
         $sql = $this->insertQueryPrepare($formdef_file, $client_id, $params);
-        if($sql !== false) return $this->insertQueryExecute($sql, $params,$event_identifier = '');
+        if($sql !== false) return $this->insertQueryExecute($sql, $params,$event_identifier);
         else return false;
     }
 
@@ -2695,7 +2695,7 @@
 			$this->server->fault('data_processing_error', $app->remoting_lib->errorMessage);
 			return false;
 		}
-		
+		$app->log('Executed insertQueryPrepare', LOGLEVEL_DEBUG);
         return $sql;
 	}
 	
@@ -2717,7 +2717,7 @@
 		// set a few values for compatibility with tform actions, mostly used by plugins
 		$this->id = $insert_id;
 		$this->dataRecord = $params;
-		
+		$app->log('Executed insertQueryExecute, raising events now if any: ' . $event_identifier, LOGLEVEL_DEBUG);
 		if($event_identifier != '') $app->plugin->raiseEvent($event_identifier,$this);
 	
 		//$app->uses('tform');
@@ -2734,7 +2734,7 @@
 		global $app;
 		
 		$sql = $this->updateQueryPrepare($formdef_file, $client_id, $primary_id, $params);
-        if($sql !== false) return $this->updateQueryExecute($sql, $primary_id, $params,$event_identifier = '');
+        if($sql !== false) return $this->updateQueryExecute($sql, $primary_id, $params,$event_identifier);
         else return false;
 	}
 	

--
Gitblit v1.9.1