From 676c95cf17fc49c32d4ea88dc7cf6d3659afd33e Mon Sep 17 00:00:00 2001 From: icewing Date: Fri, 6 Jun 2008 12:24:52 +0000 Subject: Marcus Povey * More internationalisation git-svn-id: https://code.elgg.org/elgg/trunk@823 36083f99-b078-4883-b0ff-0f9b5a30f544 --- services/api/rest.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'services/api') diff --git a/services/api/rest.php b/services/api/rest.php index 2944a24ff..41e44d9b2 100644 --- a/services/api/rest.php +++ b/services/api/rest.php @@ -26,7 +26,7 @@ // Check to see if the api is available if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true)) - throw new ConfigurationException("Sorry, API access has been disabled by the administrator."); + throw new SecurityException(elgg_echo('SecurityException:APIAccessDenied')); // Register some default PAM methods, plugins can add their own register_pam_handler('pam_auth_session'); @@ -47,11 +47,11 @@ $result = execute_method($method, $params, $token); } else - throw new SecurityException("No authentication methods were found that could authenticate this API request."); + throw new SecurityException(elgg_echo('SecurityException:NoAuthMethods')); // Finally output if (!($result instanceof GenericResult)) - throw new APIException("API Result is of an unknown type, this should never happen."); + throw new APIException(elgg_echo('APIException:ApiResultUnknown')); // Output the result page_draw($method, elgg_view("api/output", array("result" => $result))); -- cgit v1.2.3