From dc9465495a5911f694cfed4eaf1d5b07e9943513 Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Wed, 25 Jan 2023 22:49:58 +0100 Subject: [PATCH 1/2] replace DESC with DESCR --- Views/recipe/view.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Views/recipe/view.php b/Views/recipe/view.php index 9697040..37cea91 100644 --- a/Views/recipe/view.php +++ b/Views/recipe/view.php @@ -11,7 +11,7 @@ $O_recipe = $A_view["RECIPE"];

S_NAME ?>

I_TIME ?> — O_DIFFICULTY->S_NAME ?>

-

S_DESC ?>

+

S_DESCR ?>

From ececccc3a0a25c762053558b2c873bb56d80ca13 Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Wed, 25 Jan 2023 22:54:06 +0100 Subject: [PATCH 2/2] handle deleted users (null author) --- Views/recipe/view.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Views/recipe/view.php b/Views/recipe/view.php index 37cea91..ef41e4a 100644 --- a/Views/recipe/view.php +++ b/Views/recipe/view.php @@ -35,7 +35,14 @@ $O_recipe = $A_view["RECIPE"];
-

By getAuthor()->S_USERNAME ?>

+ getAuthor(); + if($O_author === null) { + echo '

By an anonymous user

'; + } else { + echo '

By '.$O_author->S_USERNAME.'

'; + } + ?>