From 20ca45c91dc66144e2998d0c4ffa716c4b6c0057 Mon Sep 17 00:00:00 2001 From: gregcorbett Date: Thu, 12 Oct 2023 13:33:52 +0000 Subject: [PATCH] Rework Home Site display - Having the line break in the href string cause the spaces to be interpreted as part of the URL. - Add a comment explaining why xecho is used here - Refactor HomeSite ShortName display using variable - factor out $params['user']->getHomeSite() - indentation of "?>" looks a little weird but i guess it makes sense because it's treating the `if` as a reason to increase the indent. --- htdocs/web_portal/views/user/view_user.php | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/htdocs/web_portal/views/user/view_user.php b/htdocs/web_portal/views/user/view_user.php index b061c4ea3..3f33d2980 100644 --- a/htdocs/web_portal/views/user/view_user.php +++ b/htdocs/web_portal/views/user/view_user.php @@ -118,14 +118,23 @@ --> - getHomeSite() != null) { ?> + getHomeSite(); + if ($homeSite != null) { + ?> Home Site - - getHomeSite()->getShortName()) ?> - + getId(); + $homeShortName = $homeSite->getShortName(); + echo ""; + // Use xecho as the Site's ShortName is user + // submitted input. + xecho($homeShortName); + echo ""; + ?>