Skip to content

Commit

Permalink
Short long lines
Browse files Browse the repository at this point in the history
- factor out $params['user']->getHomeSite()
- split up long echo into two smaller ones
  • Loading branch information
gregcorbett committed Nov 29, 2023
1 parent 800ec3b commit fa1f87c
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions htdocs/web_portal/views/user/view_user.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,15 +118,20 @@
</div>
</td>
</tr>-->
<?php if (sizeof($params['user']->getHomeSite()) != 0) { ?>
<?php
$homeSite = $params['user']->getHomeSite();
if (sizeof($homeSite) != 0) {
?>
<tr class="site_table_row_2">
<td class="site_table">Home Site</td>
<td class="site_table">
<?php
$homeId = $params['user']->getHomeSite()->getId();
$homeShortName = $params['user']->getHomeSite()->getShortName();
echo "<a href=\"index.php?Page_Type=Site&amp;id=$homeId\">";
// Use xecho as the Site's ShortName is user submitted input.
$homeId = $homeSite->getId();
$homeShortName = $homeSite->getShortName();
echo "<a href=\"index.php?Page_Type=Site&amp;id=";
echo "$homeId\">";
// Use xecho as the Site's ShortName is user
// submitted input.
xecho($homeShortName);
echo "</a>";
?>
Expand Down

0 comments on commit fa1f87c

Please sign in to comment.