summaryrefslogtreecommitdiffstats
path: root/public_html/api
diff options
context:
space:
mode:
authorAleksander Machniak <alec@alec.pl>2012-01-16 13:22:13 +0100
committerAleksander Machniak <alec@alec.pl>2012-01-16 13:22:13 +0100
commite8eaeb86f077deaffdaa0c3262284e4f540cada6 (patch)
treeb54715ba9be402684a86ce1f92dbf41c6ab66be7 /public_html/api
parentbe19966794ae6f9074fed51af8b902d03eacdf73 (diff)
downloadwebadmin-e8eaeb86f077deaffdaa0c3262284e4f540cada6.tar.gz
CS fixes
Diffstat (limited to 'public_html/api')
-rw-r--r--public_html/api/index.php25
1 files changed, 13 insertions, 12 deletions
diff --git a/public_html/api/index.php b/public_html/api/index.php
index 54ae2cb..1349a1c 100644
--- a/public_html/api/index.php
+++ b/public_html/api/index.php
@@ -1,18 +1,19 @@
<?php
- require_once( dirname(__FILE__) . "/../../lib/functions.php");
- // init frontend controller
- $controller = new kolab_admin_api_controller;
+require_once dirname(__FILE__) . "/../../lib/functions.php";
- try {
- $postdata = $_SERVER['REQUEST_METHOD'] == 'POST' ? @json_decode(file_get_contents('php://input'), true) : null;
- $controller->dispatch($postdata);
- } catch(Exception $e) {
- error_log($e->getMessage());
- $controller->output->error($e->getMessage(), $e->getCode());
- }
+// init frontend controller
+$controller = new kolab_admin_api_controller;
- // if we arrive here the controller didn't generate output
- $controller->output->error("Invalid request");
+try {
+ $postdata = $_SERVER['REQUEST_METHOD'] == 'POST' ? @json_decode(file_get_contents('php://input'), true) : null;
+ $controller->dispatch($postdata);
+} catch(Exception $e) {
+ error_log($e->getMessage());
+ $controller->output->error($e->getMessage(), $e->getCode());
+}
+
+// if we arrive here the controller didn't generate output
+$controller->output->error("Invalid request");
?>