@@ -81,7 +81,7 @@ class remoting_admin extends remoting {
// check if permissions are valid
$value=strtolower($value);
if(!preg_match('/^[riud]+$/',$value)){
$this->server->fault('invalid parameters',$value.' is no valid permission string.');
thrownewSoapFault('invalid parameters',$value.' is no valid permission string.');
returnfalse;
}
...
...
@@ -95,7 +95,7 @@ class remoting_admin extends remoting {
break;
default:
$this->server->fault('invalid parameters','Only sys_userid, sys_groupid, sys_perm_user and sys_perm_group parameters can be changed with this function.');
thrownewSoapFault('invalid parameters','Only sys_userid, sys_groupid, sys_perm_user and sys_perm_group parameters can be changed with this function.');
$this->server->fault('permission_denied','You do not have the permissions to access this function.');
thrownewSoapFault('permission_denied','You do not have the permissions to access this function.');
returnfalse;
}
...
...
@@ -337,13 +335,13 @@ class remoting_client extends remoting {
// check if client exists
$check=$app->db->queryOneRecord('SELECT `client_id` FROM `client` WHERE `client_id` = ?',$client_id);
if(!$check){
$this->server->fault('Invalid client');
thrownewSoapFault('Invalid client');
returnfalse;
}
// check if template exists
$check=$app->db->queryOneRecord('SELECT `assigned_template_id` FROM `client_template_assigned` WHERE `assigned_template_id` = ?',$assigned_template_id);
if(!$check){
$this->server->fault('Invalid template');
thrownewSoapFault('Invalid template');
returnfalse;
}
...
...
@@ -358,7 +356,7 @@ class remoting_client extends remoting {
return$affected_rows;
}else{
$this->server->fault('The IDs must be of type integer.');
thrownewSoapFault('The IDs must be of type integer.');
$instance_record=$app->db->queryOneRecord("SELECT * FROM `sys_remoteaction` WHERE `action_param`=? and `action_type`=? and `action_state`='pending'",$primary_id,$action_type);
if($instance_record['action_id']>=1){
$this->server->fault('duplicate_action',"There is already a pending $action_type action");
thrownewSoapFault('duplicate_action',"There is already a pending $action_type action");
returnfalse;
}
...
...
@@ -600,7 +600,7 @@ class remoting_mail extends remoting {
$instance_record=$app->db->queryOneRecord("SELECT * FROM `sys_remoteaction` WHERE `action_param`= ? and `action_type`= ? and `action_state`= ?",$primary_id,$action_type,'pending');
if($instance_record['action_id']>=1){
$this->server->fault('duplicate_action',"There is already a pending $action_type action");
thrownewSoapFault('duplicate_action',"There is already a pending $action_type action");
returnfalse;
}
...
...
@@ -958,7 +958,7 @@ class remoting_sites extends remoting {