diff --git a/dev_mvc/controller/MVCController.php b/dev_mvc/controller/MVCController.php index d21c76d..e496d16 100644 --- a/dev_mvc/controller/MVCController.php +++ b/dev_mvc/controller/MVCController.php @@ -67,8 +67,11 @@ class MVCController{ //check if testaction is valid if(file_exists($this->testaction)){ + + echo('"output": ['); //execute testaction include_once($this->testaction); + echo("]"); } } diff --git a/dev_mvc/controller/TestUtils.php b/dev_mvc/controller/TestUtils.php index a73bc51..2aa3812 100644 --- a/dev_mvc/controller/TestUtils.php +++ b/dev_mvc/controller/TestUtils.php @@ -4,11 +4,16 @@ class TestUtils{ public static $log = []; public static $status; - public static function log($output, $status = "OK"){ + public static function log($output, $status = "OK",$addComma = false){ $loginput = []; $loginput['message'] = $output; $loginput['status'] = $status; echo(json_encode($loginput)); + if($addComma){ + echo(','); + } + echo("\n"); + return; } public static function returnLog(){ echo(json_encode(self::$log)); diff --git a/dev_mvc/index.php b/dev_mvc/index.php index c40b3ed..b6bf263 100644 --- a/dev_mvc/index.php +++ b/dev_mvc/index.php @@ -1,8 +1,5 @@ executeModel(); if(!isset($_POST['testaction'])){ include_once("./view/content_pagetemplate.php"); } + ?> \ No newline at end of file diff --git a/dev_mvc/model/testactions/model_createdb.php b/dev_mvc/model/testactions/model_createdb.php index de2787e..77e0906 100644 --- a/dev_mvc/model/testactions/model_createdb.php +++ b/dev_mvc/model/testactions/model_createdb.php @@ -1,5 +1,5 @@