function opigno_collaborative_workspaces_handle_response_errors in Opigno Moxtra App 7
6 calls to opigno_collaborative_workspaces_handle_response_errors()
- opigno_collaborative_workspaces_add_users in modules/
opigno_collaborative_workspaces/ includes/ opigno_collaborative_workspaces.api.inc - opigno_collaborative_workspaces_create_collaborative_workspace in modules/
opigno_collaborative_workspaces/ includes/ opigno_collaborative_workspaces.api.inc - opigno_collaborative_workspaces_delete_collaborative_workspace in modules/
opigno_collaborative_workspaces/ includes/ opigno_collaborative_workspaces.api.inc - opigno_collaborative_workspaces_remove_user in modules/
opigno_collaborative_workspaces/ includes/ opigno_collaborative_workspaces.api.inc - opigno_collaborative_workspaces_send_message in modules/
opigno_collaborative_workspaces/ includes/ opigno_collaborative_workspaces.api.inc
File
- modules/
opigno_collaborative_workspaces/ includes/ opigno_collaborative_workspaces.api.inc, line 189
Code
function opigno_collaborative_workspaces_handle_response_errors($response, $function_name) {
if ($response == NULL || $response->http_code != 200) {
watchdog('Collaborative workspace', $function_name . ': Error while contacting the Moxtra server. <br />$response: <pre>' . print_r($response, TRUE) . '</pre>', array(), WATCHDOG_ERROR);
if ($response->message == 'cann\'t expel owner') {
form_set_error('', t('You cannot remove the owner of the collaborative workspace.'));
}
else {
form_set_error('', t('Error while contacting the Moxtra server. Try again or contact the administrator.'));
}
return $response;
}
return $response;
}