Tags on favorites now working

I done a thinger.
This commit is contained in:
aftercase 2021-08-18 22:48:37 +01:00
parent 09c7e6ba92
commit 77bead92a6

View file

@ -281,9 +281,8 @@ $protocol = paste_protocol();
$f_dateui = $f_date->format("d F Y"); $f_dateui = $f_date->format("d F Y");
$Recent_update = new DateTime($row['updated_at']); $Recent_update = new DateTime($row['updated_at']);
$Recent_update_u = date_format($Recent_update, 'U'); $Recent_update_u = date_format($Recent_update, 'U');
$f_tags = Trim($row['tagsys']); $tagArray2 = array_map(function ($tag) { return $tag['name'];}, getPasteTags($conn, $f_id));
$ftagArray = explode(',', $f_tags); $f_tags = implode(',', $tagArray2);
$ftagArray = array_filter($ftagArray);
//$p_link = ($mod_rewrite == '1') ? "$f_id" : "paste.php?favdel=$fu_id"; //$p_link = ($mod_rewrite == '1') ? "$f_id" : "paste.php?favdel=$fu_id";
//$f_delete_link = ($mod_rewrite == '1') ? "user.php?favdel&user=$profile_username&fid=$f_id" : "user.php?favdel&user=$profile_username&fid=$f_id"; //$f_delete_link = ($mod_rewrite == '1') ? "user.php?favdel&user=$profile_username&fid=$f_id" : "user.php?favdel&user=$profile_username&fid=$f_id";
$title = truncate($title, 20, 50); $title = truncate($title, 20, 50);
@ -308,8 +307,8 @@ $protocol = paste_protocol();
</td> </td>
<td class="td-left">'; <td class="td-left">';
if (strlen($f_tags) > 0) { if (strlen($f_tags) > 0) {
foreach ($ftagArray as $key => $ftags) { foreach ($tagArray2 as $tags) {
echo '<span class="tag is-info">' . trim($ftags) . '</span>'; echo '<a href="' . $protocol . $baseurl . '/user.php?user=' . $profile_username . '&q=' . $tags . '"><span class="tag is-info">' . trim($tags) . '</span></a>';
} }
} else { } else {
echo ' <span class="tag is-warning">No tags</span>'; echo ' <span class="tag is-warning">No tags</span>';