do not call queryImg() twice
This commit is contained in:
parent
7baf1bdcf3
commit
112f4daf81
@ -85,13 +85,15 @@ final class RecipeController
|
|||||||
$O_recipe = RecipeModel::getRecipeByID($A_urlParams[0]);
|
$O_recipe = RecipeModel::getRecipeByID($A_urlParams[0]);
|
||||||
|
|
||||||
header("Content-Type: image");
|
header("Content-Type: image");
|
||||||
if (isset($O_recipe) && $O_recipe->queryImg() !== null) {
|
if (isset($O_recipe)) {
|
||||||
echo $O_recipe->queryImg();
|
$S_img = $O_recipe->queryImg();
|
||||||
} else {
|
if ($S_img !== null) {
|
||||||
echo file_get_contents(Constants::rootDir()."/static/img/default_recipe.jpg");
|
echo $S_img;
|
||||||
|
return Utils::RETURN_RAW;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
echo file_get_contents(Constants::rootDir()."/static/img/default_recipe.jpg");
|
||||||
return Utils::RETURN_RAW;
|
return Utils::RETURN_RAW;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user