Merge pull request #4 from ThomasRubini/404

This commit is contained in:
Thomas Rubini 2023-01-16 20:59:18 +01:00
commit 240a771f8e
No known key found for this signature in database
GPG Key ID: C7D287C8C1CAC373
2 changed files with 4 additions and 5 deletions

View File

@ -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);

1
Views/common/404.php Normal file
View File

@ -0,0 +1 @@
<h1>404 page not found</h1>