Merge pull request #4 from ThomasRubini/404
This commit is contained in:
commit
240a771f8e
@ -6,15 +6,13 @@ final class RecipeController
|
|||||||
public function viewAction(Array $A_urlParams = null, Array $A_postParams = null)
|
public function viewAction(Array $A_urlParams = null, Array $A_postParams = null)
|
||||||
{
|
{
|
||||||
if(count($A_urlParams)!=1){
|
if(count($A_urlParams)!=1){
|
||||||
echo "404";
|
return View::show("common/404");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$O_recipeModel = new RecipeModel();
|
$O_recipeModel = new RecipeModel();
|
||||||
$A_returnArray = $O_recipeModel->getFullRecipeWithComments($A_urlParams[0]);
|
$A_returnArray = $O_recipeModel->getFullRecipeWithComments($A_urlParams[0]);
|
||||||
if ($A_returnArray === null) {
|
if ($A_returnArray === null) {
|
||||||
echo "404";
|
return View::show("common/404");
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
View::show("recipe/view", $A_returnArray);
|
View::show("recipe/view", $A_returnArray);
|
||||||
|
1
Views/common/404.php
Normal file
1
Views/common/404.php
Normal file
@ -0,0 +1 @@
|
|||||||
|
<h1>404 page not found</h1>
|
Loading…
Reference in New Issue
Block a user