diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-06 12:24:52 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-06-06 12:24:52 +0000 |
commit | 676c95cf17fc49c32d4ea88dc7cf6d3659afd33e (patch) | |
tree | 9ba456f3f7c8b52f386574d76ee4c4c66a076ad8 /services/api/rest.php | |
parent | 66a312099d0c075535d2443ed6c99585eecfe105 (diff) | |
download | elgg-676c95cf17fc49c32d4ea88dc7cf6d3659afd33e.tar.gz elgg-676c95cf17fc49c32d4ea88dc7cf6d3659afd33e.tar.bz2 |
Marcus Povey <marcus@dushka.co.uk>
* More internationalisation
git-svn-id: https://code.elgg.org/elgg/trunk@823 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'services/api/rest.php')
-rw-r--r-- | services/api/rest.php | 6 |
1 files changed, 3 insertions, 3 deletions
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))); |