function drd_server_error in Drupal Remote Dashboard Server 6.2
Same name and namespace in other branches
- 6 drd_server.module \drd_server_error()
- 7.2 drd_server.module \drd_server_error()
- 7 drd_server.module \drd_server_error()
Prepare an error message for returning to the XMLRPC caller.
Parameters
string $message: The message to be sent to the XMLRPC caller.
int $code: Type of error.
Return value
string Returns the encoded message.
6 calls to drd_server_error()
- drd_server_domain_reset_user1 in ./
drd_server.domain.inc - Define name and password for the special user 1
- drd_server_execute in ./
drd_server.module - This is called to execute one of the actions that are defined on one of the hook_drd_server_actions()
- drd_server_key in ./
drd_server.module - This is called to update the excryption keys for this server and all it's domains hosted in the same Drupal installation.
- drd_server_server_php_error_log in ./
drd_server.server.inc - DRD Server Action to retrieve the PHP error log from the OS.
- drd_server_svn_config_read in ./
drd_server_svn.module
File
- ./
drd_server.module, line 778
Code
function drd_server_error($message, $code = 1) {
if (is_object($message)) {
$message = (array) $message;
}
if (is_array($message)) {
$message = implode(' ', $message);
}
$encrypt = !in_array($code, array(
DRD_SERVER_ERROR_WRONG_REFERER,
DRD_SERVER_ERROR_NO_REFERER,
DRD_SERVER_ERROR_MISSING_AES,
DRD_SERVER_ERROR_WRONG_KEYS,
));
return drd_server_output(xmlrpc_error($code, strip_tags($message)), $encrypt);
}