From 21dea6d9a773eacaa7d04c3577a2693d6726526c Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Mon, 27 May 2024 02:04:11 -0700 Subject: [PATCH] Notify if trying to post to non-existent followup-to group. --- Rocksolid_Light/rocksolid/post.php | 21 +++++++++++++++++++-- Rocksolid_Light/version.txt | 2 +- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/Rocksolid_Light/rocksolid/post.php b/Rocksolid_Light/rocksolid/post.php index 662dd18..a9f15ed 100644 --- a/Rocksolid_Light/rocksolid/post.php +++ b/Rocksolid_Light/rocksolid/post.php @@ -367,9 +367,22 @@ if ($show == 1) { echo $text_post["followup_not_allowed"]; echo " " . $newsgroups; } else { + // check that we can post to the newsgroup + $ngroups = preg_split("/[\s,]+/", $newsgroups); + $found = false; + foreach ($ngroups as $group) { + if(get_section_by_group($group)) { + $found = true; + break; + } + } // show post form $fieldencrypt = md5(rand(1, 10000000)); - echo '

' . $text_post["group_head"] . group_display_name($newsgroups) . $text_post["group_tail"] . '

'; + echo '

' . $text_post["group_head"] . group_display_name($newsgroups) . $text_post["group_tail"]; + if(!$found) { + echo ' (posting will fail - no such group)'; + } + echo '

'; if (isset($error)) echo "

$error

"; @@ -390,7 +403,11 @@ if ($show == 1) { echo ''; echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo ''; diff --git a/Rocksolid_Light/version.txt b/Rocksolid_Light/version.txt index ca6f47f..91bd098 100644 --- a/Rocksolid_Light/version.txt +++ b/Rocksolid_Light/version.txt @@ -1 +1 @@ -0.9.86 +0.9.87