diff --git a/Rocksolid_Light/rocksolid/post.php b/Rocksolid_Light/rocksolid/post.php
index deadc76..04ef308 100644
--- a/Rocksolid_Light/rocksolid/post.php
+++ b/Rocksolid_Light/rocksolid/post.php
@@ -67,6 +67,15 @@ if ($OVERRIDES['enable_post_log'] > 0) {
@$abspeichern = $_REQUEST["abspeichern"];
@$references = $_REQUEST["references"];
@$id = $_REQUEST["id"];
+
+if($type == 'reply') {
+ $max_crosspost = 12;
+ $allow_ngs_edit = false;
+} else {
+ $max_crosspost = 3;
+ $allow_ngs_edit = true;
+}
+
if (! isset($group) && isset($newsgroups)) {
$group = $newsgroups;
}
@@ -106,6 +115,15 @@ if ($_REQUEST['returngroup']) {
$returngroup = $thisgroup;
}
+$linkgroups = preg_split("/[\s,]+/", $returngroup);
+foreach($linkgroups as $linkgroup) {
+ $linkgroup = trim($linkgroup);
+ if (get_section_by_group($linkgroup)) {
+ $returngroup = $linkgroup;
+ break;
+ }
+}
+
echo '
';
echo '' . basename(getcwd()) . ' / ';
echo '' . htmlspecialchars(group_display_name($returngroup)) . '';
@@ -219,7 +237,13 @@ if ($type == "post") {
$type = "retry";
$error = $text_post["missing_subject"];
}
-
+ if($allow_ngs_edit) {
+ $grouptotal = preg_split("/\,/", $newsgroups);
+ if(count($grouptotal) > $max_crosspost) {
+ $type = "retry";
+ $error = "Too many newsgroups";
+ }
+ }
// captcha-check
if (($post_captcha) && (captcha::check() == false)) {
$type = "retry";
@@ -398,6 +422,7 @@ if ($show == 1) {
$ngroups = preg_split("/[\s,]+/", $newsgroups);
$found = false;
foreach ($ngroups as $group) {
+ $group = trim($group);
if (get_section_by_group($group)) {
$found = true;
break;
@@ -441,6 +466,17 @@ if ($show == 1) {
echo '';
echo '';
echo ' | ';
+ } else {
+ echo 'Newsgroups: | ';
+ echo '';
+ if($allow_ngs_edit) {
+ echo '';
+ echo " comma separated, max $max_crosspost groups";
+ } else {
+ echo '';
+ }
+ echo ' | ';
+ echo ' |
';
}
echo '' . $text_post["name"] . ' | ';