aboutsummaryrefslogtreecommitdiff
path: root/endpoints/rest.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-10 16:12:17 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-10 16:12:17 +0000
commitc21600e85f148f41173c68d3024a4c1329b8ff58 (patch)
tree48ace3b3b56a075049c58e0704b8133bafaaca9e /endpoints/rest.php
parent12595675751655c3aac9a79773ce9e487a850dbd (diff)
downloadelgg-c21600e85f148f41173c68d3024a4c1329b8ff58.tar.gz
elgg-c21600e85f148f41173c68d3024a4c1329b8ff58.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Tokens and execute code added to api git-svn-id: https://code.elgg.org/elgg/trunk@140 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'endpoints/rest.php')
-rw-r--r--endpoints/rest.php11
1 files changed, 9 insertions, 2 deletions
diff --git a/endpoints/rest.php b/endpoints/rest.php
index 483971eb4..cb47804ed 100644
--- a/endpoints/rest.php
+++ b/endpoints/rest.php
@@ -17,10 +17,10 @@
// Register the error handler
error_reporting(E_ALL);
- set_error_handler('__php_error_handler');
+ set_error_handler('__php_api_error_handler');
// Register a default exception handler
- set_exception_handler('__php_exception_handler');
+ set_exception_handler('__php_api_exception_handler');
// Get parameter variables
$format = get_input('format', 'php');
@@ -40,6 +40,11 @@
// Get api header
$api_header = get_and_validate_api_headers();
$ApiEnvironment->api_header = $api_header;
+
+ // Get site
+
+
+
// Pull API user details
$ApiEnvironment->api_user = get_api_user($api_header->api_key);
@@ -94,6 +99,8 @@
}
else
{
+ // TODO: set site environment
+
// User is logged in, just execute
if (isset($params['auth_token'])) $token = $params['auth_token'];
$result = execute_method($method, $params, $token);