🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rocksolid.nodes.announce
Article #206

Re: first sync after change

#206
From: Retro Guy Retro Guy
Date: Mon, 01 Jun 2020 09:37
72 lines
3969 bytes
This is a multi-part message in MIME format.
--------------5ed4cc4e814997.11182267
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit

Could you add the function below (and attached) to /var/www/html/rocksolid/lib/message.inc.php and then call this function instead of message read with vichan?

I'm curious still if we're messing anything up calling message read but not from the rslight code. 

I don't have your modified vichan to test with so this is untested. It might just do nothing useful. Also, I kept '$bodynum=0' in the declaration so you don't need to change anything to call it other than the function name.

Also, if you could delete the files mentioned in the previous message in this thread let's see if we get anywhere.

Thanks!

Retro Guy

------------------------------
function vichan_message_read($id,$bodynum=0,$group="") {
  global $spooldir,$spoolpath,$text_error;
  if (!testGroup($group)) {
    echo $text_error["read_access_denied"];
    return;
  }
  $message = new messageType;
   $articlepath = $spoolpath.preg_replace('/./', '/', $group)."/".$id;
   if (file_exists($articlepath)) {
    $rawmessage_fh = fopen($articlepath, "r");
     $rawmessage=array();
     $line=rtrim(fgets($rawmessage_fh), PHP_EOL);
     while(!feof($rawmessage_fh)) {
       if(strcmp($line,".") == 0) {
         break;
       }
       $rawmessage[]=$line;
       $line=rtrim(fgets($rawmessage_fh), PHP_EOL); 
     }
    fclose($rawmessage_fh);
   } else {
    return false;
   }
  $message=message_parse($rawmessage);
  return $message;
}


--------------5ed4cc4e814997.11182267
Content-Type: text/plain;
 name=vichan_message_read.txt
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
 filename=vichan_message_read.txt

ZnVuY3Rpb24gdmljaGFuX21lc3NhZ2VfcmVhZCgkaWQsJGJvZHludW09MCwk
Z3JvdXA9IiIpIHsKICBnbG9iYWwgJHNwb29sZGlyLCRzcG9vbHBhdGgsJHRl
eHRfZXJyb3I7CiAgaWYgKCF0ZXN0R3JvdXAoJGdyb3VwKSkgewogICAgZWNo
byAkdGV4dF9lcnJvclsicmVhZF9hY2Nlc3NfZGVuaWVkIl07CiAgICByZXR1
cm47CiAgfQogICRtZXNzYWdlID0gbmV3IG1lc3NhZ2VUeXBlOwogICAkYXJ0
aWNsZXBhdGggPSAkc3Bvb2xwYXRoLnByZWdfcmVwbGFjZSgnL1wuLycsICcv
JywgJGdyb3VwKS4iLyIuJGlkOwogICBpZiAoZmlsZV9leGlzdHMoJGFydGlj
bGVwYXRoKSkgewogICAgJHJhd21lc3NhZ2VfZmggPSBmb3BlbigkYXJ0aWNs
ZXBhdGgsICJyIik7CiAgICAgJHJhd21lc3NhZ2U9YXJyYXkoKTsKICAgICAk
bGluZT1ydHJpbShmZ2V0cygkcmF3bWVzc2FnZV9maCksIFBIUF9FT0wpOwog
ICAgIHdoaWxlKCFmZW9mKCRyYXdtZXNzYWdlX2ZoKSkgewogICAgICAgaWYo
c3RyY21wKCRsaW5lLCIuIikgPT0gMCkgewogICAgICAgICBicmVhazsKICAg
ICAgIH0KICAgICAgICRyYXdtZXNzYWdlW109JGxpbmU7CiAgICAgICAkbGlu
ZT1ydHJpbShmZ2V0cygkcmF3bWVzc2FnZV9maCksIFBIUF9FT0wpOyAKICAg
ICB9CiAgICBmY2xvc2UoJHJhd21lc3NhZ2VfZmgpOwogICB9IGVsc2Ugewog
ICAgcmV0dXJuIGZhbHNlOwogICB9CiAgJG1lc3NhZ2U9bWVzc2FnZV9wYXJz
ZSgkcmF3bWVzc2FnZSk7CiAgcmV0dXJuICRtZXNzYWdlOwp9Cgo=

--------------5ed4cc4e814997.11182267--
Technical Details
Message-ID: <ed6e84c066894ab1785cdd5c1429d95f$1@192.168.0.220>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!i2pn2.org!.POSTED!not-for-mail
References: <de1a6b5b3a3aff1f144b8390c4128d35$1@news.novabbs.com> <na.255.1837r2@anon.com> <24f82b277817b822b6ef83a568a9df75$1@www.novabbs.com> <a403d7a6d5ba84b45dccbf5db6694ece$1@www.novabbs.com>

Show Full Headers
Complete Article Headers
Message-ID: <ed6e84c066894ab1785cdd5c1429d95f$1@192.168.0.220>
Subject: Re: first sync after change
Date: Mon, 01 Jun 2020 09:37:00 +0000
From: Retro Guy@example.com (Retro Guy)
References: <de1a6b5b3a3aff1f144b8390c4128d35$1@news.novabbs.com> <na.255.1837r2@anon.com> <24f82b277817b822b6ef83a568a9df75$1@www.novabbs.com> <a403d7a6d5ba84b45dccbf5db6694ece$1@www.novabbs.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!i2pn2.org!.POSTED!not-for-mail
Newsgroups: rocksolid.nodes.announce
Organization: rslight Debian test site
Mime-Version: 1.0
Content-Type: multipart/mixed;boundary="------------5ed4cc4e814997.11182267"
Injection-Info: i2pn2.org; posting-account="retrobbs1";
 logging-data="8775"; mail-complaints-to="usenet@i2pn2.org"
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on i2pwall.i2p
X-Rslight-Site: $2y$10$EoUu4ziq0G8kmp9N03D2v.PzXHhjXB2xTmotQAAl6xA7VM5NU1s5q