diff --git a/Controllers/RecipeController.php b/Controllers/RecipeController.php index 5b22ce6..761a965 100644 --- a/Controllers/RecipeController.php +++ b/Controllers/RecipeController.php @@ -6,15 +6,13 @@ final class RecipeController public function viewAction(Array $A_urlParams = null, Array $A_postParams = null) { if(count($A_urlParams)!=1){ - echo "404"; - return; + return View::show("common/404"); } - + $O_recipeModel = new RecipeModel(); $A_returnArray = $O_recipeModel->getFullRecipeWithComments($A_urlParams[0]); if ($A_returnArray === null) { - echo "404"; - return; + return View::show("common/404"); } View::show("recipe/view", $A_returnArray); diff --git a/Views/common/404.php b/Views/common/404.php new file mode 100644 index 0000000..0d247fb --- /dev/null +++ b/Views/common/404.php @@ -0,0 +1 @@ +

404 page not found

\ No newline at end of file