Skip to content

Commit 31c5f16

Browse files
committed
Fix for the evnt based plugin system when used by the remoting framework.
1 parent b3248e6 commit 31c5f16

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,8 @@ public function mail_user_filter_add($session_id, $client_id, $params)
263263
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
264264
return false;
265265
}
266-
$affected_rows = $this->insertQuery('../mail/form/mail_user_filter.tform.php', $client_id, $params);
267-
$app->plugin->raiseEvent('mail:mail_user_filter:on_after_insert',$this);
266+
$affected_rows = $this->insertQuery('../mail/form/mail_user_filter.tform.php', $client_id, $params,'mail:mail_user_filter:on_after_insert');
267+
// $app->plugin->raiseEvent('mail:mail_user_filter:on_after_insert',$this);
268268
return $affected_rows;
269269
}
270270

@@ -276,8 +276,8 @@ public function mail_user_filter_update($session_id, $client_id, $primary_id, $p
276276
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
277277
return false;
278278
}
279-
$affected_rows = $this->updateQuery('../mail/form/mail_user_filter.tform.php', $client_id, $primary_id, $params);
280-
$app->plugin->raiseEvent('mail:mail_user_filter:on_after_update',$this);
279+
$affected_rows = $this->updateQuery('../mail/form/mail_user_filter.tform.php', $client_id, $primary_id, $params,'mail:mail_user_filter:on_after_update');
280+
// $app->plugin->raiseEvent('mail:mail_user_filter:on_after_update',$this);
281281
return $affected_rows;
282282
}
283283

@@ -1959,7 +1959,7 @@ private function klientadd($formdef_file, $reseller_id, $params)
19591959

19601960

19611961

1962-
private function insertQuery($formdef_file, $client_id, $params)
1962+
private function insertQuery($formdef_file, $client_id, $params,$event_identifier = '')
19631963
{
19641964
global $app, $tform, $remoting_lib;
19651965

@@ -1987,7 +1987,7 @@ private function insertQuery($formdef_file, $client_id, $params)
19871987

19881988
$insert_id = $app->db->insertID();
19891989

1990-
1990+
if($event_identifier != '') $app->plugin->raiseEvent($event_identifier,$this);
19911991

19921992
//$app->uses('tform');
19931993
//* Save changes to Datalog
@@ -2006,7 +2006,7 @@ private function insertQuery($formdef_file, $client_id, $params)
20062006
}
20072007

20082008

2009-
private function updateQuery($formdef_file, $client_id, $primary_id, $params)
2009+
private function updateQuery($formdef_file, $client_id, $primary_id, $params, $event_identifier = '')
20102010
{
20112011
global $app;
20122012

@@ -2042,6 +2042,8 @@ private function updateQuery($formdef_file, $client_id, $primary_id, $params)
20422042

20432043
$affected_rows = $app->db->affectedRows();
20442044

2045+
if($event_identifier != '') $app->plugin->raiseEvent($event_identifier,$this);
2046+
20452047
//* Save changes to Datalog
20462048
if($app->remoting_lib->formDef["db_history"] == 'yes') {
20472049
$new_rec = $app->remoting_lib->getDataRecord($primary_id);

0 commit comments

Comments
 (0)