Temp user profile fix.

This commit is contained in:
Floorb 2021-08-09 04:26:36 -04:00
parent 78427b410a
commit f1742c65d9
2 changed files with 6 additions and 7 deletions

View file

@ -179,9 +179,8 @@ $protocol = paste_protocol();
$p_dateui = $p_date->format("d F Y");
$p_views = Trim($row['views']);
$p_visible = intval($row['visible']);
$p_tags = Trim($row['tagsys']);
$tagArray = explode(',', $p_tags);
$tagArray = array_filter($tagArray);
$tagArray = array_map(function($tag) { return $tag['name']; }, getPasteTags($conn, $p_id));
$p_tags = implode(',', $tagArray);
$p_visible = match ($p_visible) {
@ -209,7 +208,7 @@ $protocol = paste_protocol();
</td>
<td class="td-left">';
if (strlen($p_tags) > 0) {
foreach ($tagArray as $key => $tags) {
foreach ($tagArray as $tags) {
echo '<a href="' . $protocol . $baseurl . '/user.php?user=' . $profile_username . '&q=' . $tags . '"><span class="tag is-info">' . trim($tags) . '</span></a>';
}
} else {

View file

@ -178,10 +178,10 @@ $selectedloader = "$bg[$i]"; // set variable equal to which random filename was
<div class="column is-4 has-text-right">
<div class="">
<div class="panel-tools">
<?php if ($current_user !== null) {
$fav_paste = checkFavorite($conn, $paste_id, $current_user->user_id);
<?php
if ($current_user !== null) {
echo checkFavorite($conn, $paste_id, $current_user->user_id);
}
echo $fav_paste;
?>
<a class="icon tool-icon" class="flip" onclick="openreport()"><i
class="far fa-flag fa-lg has-text-grey" title="Report Paste"></i></a>