diff --git a/Rocksolid_Light/common/themes/style.css b/Rocksolid_Light/common/themes/style.css index 8323af8..ee834f1 100644 --- a/Rocksolid_Light/common/themes/style.css +++ b/Rocksolid_Light/common/themes/style.css @@ -613,7 +613,7 @@ blockquote.np_article_quote { /* headline */ h1.np_post_headline { - font-size: 1em; + font-size: 0.8em; } /* Head with the input fields for subject, name and email */ diff --git a/Rocksolid_Light/common/version.txt b/Rocksolid_Light/common/version.txt index 1a02c2d..5d11b14 100644 --- a/Rocksolid_Light/common/version.txt +++ b/Rocksolid_Light/common/version.txt @@ -1 +1 @@ -0.9.142 +0.9.15 diff --git a/Rocksolid_Light/rocksolid/lang/english.lang b/Rocksolid_Light/rocksolid/lang/english.lang index 5268c37..7a78a86 100644 --- a/Rocksolid_Light/rocksolid/lang/english.lang +++ b/Rocksolid_Light/rocksolid/lang/english.lang @@ -49,6 +49,7 @@ $text_post["button_post"]="Post Article"; $text_post["remember"]="Remember name"; $text_post["message"]="Message"; $text_post["group_head"]="Compose a post in "; +$text_post["group_head_reply"]="Reply to post in "; $text_post["group_tail"]=""; $text_post["followup_not_allowed"]="You aren't allowed to post to the groups:"; $text_post["message_posted"]="Message posted"; diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index dc41c7c..cafc60e 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -1302,6 +1302,10 @@ function verify_logged_in($name) { $logged_in = false; $ip_pass = false; + if(!isset($_COOKIE['mail_name']) || trim($_COOKIE['mail_name'] == '')) { + return false; + } + // For checking session expire stuff if(!isset($_SESSION['start_stamp'])) { $_SESSION['start_stamp'] = time(); diff --git a/Rocksolid_Light/rocksolid/post.php b/Rocksolid_Light/rocksolid/post.php index 80d8840..ca35f07 100644 --- a/Rocksolid_Light/rocksolid/post.php +++ b/Rocksolid_Light/rocksolid/post.php @@ -23,7 +23,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ include "config.inc.php"; -$CONFIG = include ($config_file); +$CONFIG = include($config_file); include $file_newsportal; include "head.inc"; @@ -52,6 +52,11 @@ $logfile = $logdir . '/post.log'; @$references = $_REQUEST["references"]; @$id = $_REQUEST["id"]; +if (isset($_REQUEST['followupto']) && trim($_REQUEST['followupto']) != '') { + $followupto = trim($_REQUEST['followupto']); +} else { + $followupto = null; +} // Load name from cookies if ($setcookies) { if ((isset($_COOKIE["mail_name"])) && (! isset($name))) @@ -62,7 +67,7 @@ if ($setcookies) { $name = substr($name, 0, 30); $logged_in = false; -if(trim($name) != '') { +if (trim($name) != '') { $logged_in = verify_logged_in(trim(strtolower($name))); } @@ -75,38 +80,46 @@ if ($OVERRIDES['enable_post_log'] > 0) { $allow_ng_header_edit_post = true; $allow_ng_header_edit_reply = false; -if(isset($OVERRIDES['allow_ng_header_edit'])) { - if($OVERRIDES['allow_ng_header_edit'] == 'post') { +if (isset($OVERRIDES['allow_ng_header_edit'])) { + if ($OVERRIDES['allow_ng_header_edit'] == 'post') { $allow_ng_header_edit_post = true; } else { $allow_ng_header_edit_post = false; } - if($OVERRIDES['allow_ng_header_edit'] == 'reply') { + if ($OVERRIDES['allow_ng_header_edit'] == 'reply') { $allow_ng_header_edit_reply = true; } else { $allow_ng_header_edit_reply = false; } - if($OVERRIDES['allow_ng_header_edit'] == 'both') { + if ($OVERRIDES['allow_ng_header_edit'] == 'both') { $allow_ng_header_edit_post = true; $allow_ng_header_edit_reply = true; } - if($OVERRIDES['allow_ng_header_edit'] == 'none') { + if ($OVERRIDES['allow_ng_header_edit'] == 'none') { $allow_ng_header_edit_post = false; $allow_ng_header_edit_reply = false; } } $allow_ngs_edit = false; -if($type == 'reply') { - if($allow_ng_header_edit_reply) { +if ($type == 'reply') { + if ($allow_ng_header_edit_reply) { $allow_ngs_edit = true; } - $max_crosspost = 12; + if (isset($OVERRIDES['max_crosspost_reply']) && $OVERRIDES['max_crosspost_reply'] > 0) { + $max_crosspost = $OVERRIDES['max_crosspost_reply']; + } else { + $max_crosspost = 12; + } } else { - if($allow_ng_header_edit_post) { + if ($allow_ng_header_edit_post) { $allow_ngs_edit = true; } - $max_crosspost = 3; + if (isset($OVERRIDES['max_crosspost_post']) && $OVERRIDES['max_crosspost_post'] > 0) { + $max_crosspost = $OVERRIDES['max_crosspost_post']; + } else { + $max_crosspost = 3; + } } if (! isset($group) && isset($newsgroups)) { @@ -129,7 +142,8 @@ $thisgroup = _rawurldecode($_REQUEST['group']); // Is this a reply to an article containing Followup-To? if (isset($_REQUEST['fgroups'])) { - $thisgroup = $_REQUEST['fgroups']; + $thisgroup = preg_replace('!\s+!', ',', $_REQUEST['fgroups']); + $thisgroup = preg_replace('/\,+/', ',', $thisgroup); } $newsgroups = $thisgroup; @@ -140,7 +154,7 @@ if ($_REQUEST['returngroup']) { } $linkgroups = preg_split("/[\s,]+/", $returngroup); -foreach($linkgroups as $linkgroup) { +foreach ($linkgroups as $linkgroup) { $linkgroup = trim($linkgroup); if (get_section_by_group($linkgroup)) { $returngroup = $linkgroup; @@ -261,9 +275,9 @@ if ($type == "post") { $type = "retry"; $error = $text_post["missing_subject"]; } - if($allow_ngs_edit) { + if ($allow_ngs_edit) { $grouptotal = preg_split("/( |\,)/", $newsgroups); - if(count($grouptotal) > $max_crosspost) { + if (count($grouptotal) > $max_crosspost) { $type = "retry"; $error = "Too many newsgroups"; } @@ -306,9 +320,9 @@ if ($type == "post") { if (isset($_FILES["photo"]) && $_FILES["photo"]["error"] == 0) { $_FILES['photo']['name'] = preg_replace('/[^a-zA-Z0-9\.]/', '_', $_FILES['photo']['name']); // There is an attachment to handle - $message = message_post(quoted_printable_encode($subject), $nemail . " (" . quoted_printable_encode($name) . ")", $newsgroups, $references_array, addslashes($body), $_POST['encryptthis'], $_POST['encryptto'], strtolower($name), $_POST['fromname'], null, true); + $message = message_post(quoted_printable_encode($subject), $nemail . " (" . quoted_printable_encode($name) . ")", $newsgroups, $references_array, addslashes($body), $_POST['encryptthis'], $_POST['encryptto'], strtolower($name), $_POST['fromname'], $followupto, true); } else { - $message = message_post(quoted_printable_encode($subject), $nemail . " (" . quoted_printable_encode($name) . ")", $newsgroups, $references_array, addslashes($body), $_POST['encryptthis'], $_POST['encryptto'], strtolower($name), $_POST['fromname']); + $message = message_post(quoted_printable_encode($subject), $nemail . " (" . quoted_printable_encode($name) . ")", $newsgroups, $references_array, addslashes($body), $_POST['encryptthis'], $_POST['encryptto'], strtolower($name), $_POST['fromname'], $followupto); } // Article sent without errors, or duplicate? if ((substr($message, 0, 3) == "240") || (substr($message, 0, 7) == "441 435")) { @@ -356,12 +370,12 @@ if ($type == "reply") { } // For Synchronet use (deprecated) $fromname = $bodyzeile; - + // Set quote reply format (On date somebody wrote:) - if(!isset($OVERRIDES['quote_head'])) { + if (!isset($OVERRIDES['quote_head'])) { $OVERRIDES['quote_head'] = 'date_name'; } - switch($OVERRIDES['quote_head']) { + switch ($OVERRIDES['quote_head']) { case 'date_name': $bodyzeile = "On " . date("D, j M Y G:i:s O,", $head->date) . " " . $bodyzeile . $text_post["wrote_suffix"] . "\n\n"; break; @@ -377,15 +391,15 @@ if ($type == "reply") { default: $bodyzeile = "On " . date("D, j M Y G:i:s O,", $head->date) . " " . $bodyzeile . $text_post["wrote_suffix"] . "\n\n"; break; - } - - for ($i = 0; $i <= count($body) - 1; $i ++) { + + for ($i = 0; $i <= count($body) - 1; $i++) { if ((isset($cutsignature)) && ($cutsignature == true) && ($body[$i] == '-- ')) { break; } // Try not to quote blank lines at the end of all quotes - if ((trim($body[$i]) == "") && ($body[$i + 1] == '-- ' || $i >= count($body) - 1)) {} else { + if ((trim($body[$i]) == "") && ($body[$i + 1] == '-- ' || $i >= count($body) - 1)) { + } else { // Remove spaces from starting quote '>' characters $body = preg_replace("/^> >/", ">>", $body); @@ -424,7 +438,7 @@ if ($type == "reply") { $show = 1; $references = false; if (isset($head->references[0])) { - for ($i = 0; $i <= count($head->references) - 1; $i ++) { + for ($i = 0; $i <= count($head->references) - 1; $i++) { $references .= $head->references[$i] . " "; } } @@ -454,7 +468,11 @@ if ($show == 1) { } // show post form $fieldencrypt = md5(rand(1, 10000000)); - echo '

' . $text_post["group_head"] . group_display_name($newsgroups) . $text_post["group_tail"]; + if ($type == 'reply') { + echo '

' . $text_post["group_head_reply"] . group_display_name($newsgroups) . $text_post["group_tail"]; + } else { + echo '

' . $text_post["group_head"] . group_display_name($newsgroups) . $text_post["group_tail"]; + } if (! $found) { echo ' (posting will fail - no such group)'; } @@ -476,27 +494,36 @@ if ($show == 1) { echo ''; if ($has_followup) { - echo ''; - echo ''; + echo 'Newsgroups: '; echo ''; - echo '