From 399a77ffbff0294516bd155425c61ab13005a090 Mon Sep 17 00:00:00 2001 From: rylon Date: Thu, 1 Aug 2013 14:42:03 +0200 Subject: [PATCH] updated danube so it matches new system initialization standards --- api.php | 13 ++++++++----- index.php | 13 ++++++++----- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/api.php b/api.php index db75e81..da83817 100644 --- a/api.php +++ b/api.php @@ -2,12 +2,15 @@ require_once '../system/autoload.inc.php'; //SYSTEM Classes require_once 'danube/autoload.inc.php'; //Project Classes -require_once '../system/log/register_exception_shortcut.php'; //allow ERROR() instead of \SYSTEM\LOG\ERROR() -require_once '../system/log/register_errorhandler_dbwriter.php'; //write errors to db -require_once '../system/log/register_errorhandler_jsonoutput.php'; //print errors as json to caller require_once 'config.php'; -SYSTEM\system::start($danube_config); +SYSTEM\system::start($danube_config); //Start System time + config +SYSTEM\system::include_ExceptionShortcut(); //allow ERROR() instead of \SYSTEM\LOG\ERROR() +SYSTEM\system::include_ResultShortcut(); //allow JsonResult() instead of \SYSTEM\LOG\JsonResult() +SYSTEM\system::register_errorhandler_dbwriter(); //write errors to database (must be first errorhandler to register) +SYSTEM\system::register_errorhandler_jsonoutput(); //print errors as json to caller $api = new \SYSTEM\API\Api (new SYSTEM\verifyclass(), new ApiClass()); -echo $api->CALL(array_merge($_POST,$_GET)); \ No newline at end of file +echo $api->CALL(array_merge($_POST,$_GET)); + +//echo \SYSTEM\API\Api::run('\SYSTEM\verify', 'api_danube',array_merge($_POST,$_GET),group,strict=false); \ No newline at end of file diff --git a/index.php b/index.php index cd30997..0c07e95 100644 --- a/index.php +++ b/index.php @@ -2,12 +2,15 @@ require_once '../system/autoload.inc.php'; //SYSTEM Classes require_once 'danube/autoload.inc.php'; //Project Classes -require_once '../system/log/register_exception_shortcut.php'; //allow ERROR() instead of \SYSTEM\LOG\ERROR() -require_once '../system/log/register_errorhandler_dbwriter.php'; //write errors to db -require_once '../system/log/register_errorhandler_jsonoutput.php'; //print errors as json to caller require_once 'config.php'; -SYSTEM\system::start($danube_config); +SYSTEM\system::start($danube_config); //Start System time + config +SYSTEM\system::include_ExceptionShortcut(); //allow ERROR() instead of \SYSTEM\LOG\ERROR() +SYSTEM\system::include_ResultShortcut(); //allow JsonResult() instead of \SYSTEM\LOG\JsonResult() +SYSTEM\system::register_errorhandler_dbwriter(); //write errors to database (must be first errorhandler to register) +SYSTEM\system::register_errorhandler_jsonoutput(); //print errors as json to caller $page = new \SYSTEM\PAGE\PageApi(new SYSTEM\verifyclass(), new PageApi()); -echo $page->CALL(array_merge($_POST,$_GET))->html(); \ No newline at end of file +echo $page->CALL(array_merge($_POST,$_GET))->html(); + +new INFO('Page was called sucessfully.'); \ No newline at end of file