Skip to content

Commit a8dc8ba

Browse files
committed
Fixed bugs in remoting Library. Many thanks to Horfic!
1 parent 557480f commit a8dc8ba

File tree

2 files changed

+777
-731
lines changed

2 files changed

+777
-731
lines changed

interface/lib/classes/remoting.inc.php

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,52 @@ public function mail_user_delete($session_id,$domain_id)
211211
$affected_rows = $this->deleteQuery('../mail/form/mail_user.tform.php',$domain_id);
212212
return $affected_rows;
213213
}
214+
215+
//* Get mail user filter details
216+
public function mail_user_filter_get($session_id, $primary_id)
217+
{
218+
global $app;
219+
220+
if(!$this->checkPerm($session_id, 'mail_user_filter_get')) {
221+
$this->server->fault('permission_denied', 'You do not have the permissions to access this function.');
222+
return false;
223+
}
224+
$app->uses('remoting_lib');
225+
$app->remoting_lib->loadFormDef('../mail/form/mail_user_filter.tform.php');
226+
return $app->remoting_lib->getDataRecord($primary_id);
227+
}
228+
229+
public function mail_user_filter_add($session_id, $client_id, $params)
230+
{
231+
if (!$this->checkPerm($session_id, 'mail_user_filter_add')){
232+
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
233+
return false;
234+
}
235+
$affected_rows = $this->insertQuery('../mail/form/mail_user_filter.tform.php', $client_id, $params);
236+
return $affected_rows;
237+
}
238+
239+
public function mail_user_filter_update($session_id, $client_id, $primary_id, $params)
240+
{
241+
if (!$this->checkPerm($session_id, 'mail_user_filter_update'))
242+
{
243+
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
244+
return false;
245+
}
246+
$affected_rows = $this->updateQuery('../mail/form/mail_user_filter.tform.php', $client_id, $primary_id, $params);
247+
return $affected_rows;
248+
}
249+
250+
public function mail_user_filter_delete($session_id,$domain_id)
251+
{
252+
if (!$this->checkPerm($session_id, 'mail_user_filter_delete'))
253+
{
254+
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
255+
return false;
256+
}
257+
$affected_rows = $this->deleteQuery('../mail/form/mail_user_filter.tform.php',$domain_id);
258+
return $affected_rows;
259+
}
214260

215261
//* Get alias details
216262
public function mail_alias_get($session_id, $primary_id)

0 commit comments

Comments
 (0)