From 38c2aa2d7e578982e374f85cecea22cce1137a60 Mon Sep 17 00:00:00 2001
From: Retro_Guy
Date: Fri, 2 Feb 2024 13:10:01 -0700
Subject: [PATCH] Finishing previous commit, verify target exists before
creating (thread) links.
---
Rocksolid_Light/rocksolid/overboard.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/Rocksolid_Light/rocksolid/overboard.php b/Rocksolid_Light/rocksolid/overboard.php
index 50ea1eb..82f001b 100644
--- a/Rocksolid_Light/rocksolid/overboard.php
+++ b/Rocksolid_Light/rocksolid/overboard.php
@@ -342,10 +342,15 @@ function display_threads($threads, $oldest)
$url = $thissite . "/article-flat.php?id=" . $target['number'] . "&group=" . _rawurlencode($target['newsgroup']) . "#" . $target['number'];
echo '';
echo '' . headerDecode($target['subject']) . '';
+
+ // link for (thread), if possible
if (isset($this_overboard['threadlink'][$value])) {
$thread = get_data_from_msgid($this_overboard['threadlink'][$value], $target['newsgroup']);
- echo ' (thread)';
+ if ($thread !== false) {
+ echo ' (thread)';
+ }
}
+
echo '
';
echo '
';
echo '' . $target['newsgroup'] . '';