diff --git a/Rocksolid_Light/rocksolid/lib/post.inc.php b/Rocksolid_Light/rocksolid/lib/post.inc.php
index 4d746b0..ad6d1ff 100644
--- a/Rocksolid_Light/rocksolid/lib/post.inc.php
+++ b/Rocksolid_Light/rocksolid/lib/post.inc.php
@@ -417,10 +417,12 @@ function check_rate_limit($name, $set = 0, $gettime = 0)
function message_post($subject, $from, $newsgroups, $ref, $body, $encryptthis = null, $encryptto = null, $authname = null, $fromname, $followupto = null, $do_attach = null)
{
global $server, $port, $send_poster_host, $text_error, $CONFIG, $OVERRIDES;
- global $www_charset, $config_dir, $spooldir;
+ global $www_charset, $config_dir, $spooldir, $logdir, $enable_post_log, $name;
global $msgid_generate, $msgid_fqdn, $rslight_version;
flush();
+
+ $logfile = $logdir . '/post.log';
$attachment_temp_dir = $spooldir . "/tmp/";
if (! is_dir($attachment_temp_dir)) {
mkdir($attachment_temp_dir);
@@ -615,6 +617,10 @@ function message_post($subject, $from, $newsgroups, $ref, $body, $encryptthis =
// clean up attachment file
unlink($attachment_temp_dir . $_FILES["photo"]["name"]);
}
+ // Post logging
+ if ($enable_post_log) {
+ file_put_contents($logfile, "\n" . format_log_date() . " Post in: " . $newsgroups . "\n by " . $name . " as " . $from . "\n posting-user: " . $posting_user . "\n subject: " . $subject . "\n message-id: " . $msgid, FILE_APPEND);
+ }
} else {
$message = $text_error["post_failed"];
}
diff --git a/Rocksolid_Light/rocksolid/post.php b/Rocksolid_Light/rocksolid/post.php
index 3111a0b..e3b64ce 100644
--- a/Rocksolid_Light/rocksolid/post.php
+++ b/Rocksolid_Light/rocksolid/post.php
@@ -287,10 +287,6 @@ if ($type == "post") {
echo 'Please wait ' . round($wait) . ' minutes before posting again.
';
}
}
- // Post logging
- if ($enable_post_log) {
- file_put_contents($logfile, "\n" . format_log_date() . " Post in: " . $returngroup . " by " . $name . "\n " . $subject, FILE_APPEND);
- }
echo '