Verify overview exists before reading for XOVER in rslight-lib.php.

This commit is contained in:
Retro_Guy 2023-05-13 12:33:55 -07:00
parent 8cb989a440
commit 09deebae1a
1 changed files with 10 additions and 8 deletions

View File

@ -658,17 +658,19 @@ function get_xover($articles, $msgsock) {
}
}
fwrite($msgsock, $output, strlen($output));
$overviewfp=fopen($overviewfile, 'r');
while($overviewline=fgets($overviewfp)) {
$article=preg_split("/[\s,]+/", $overviewline);
for($i=$first; $i<=$last; $i++) {
if($article[0] === strval($i)) {
$overviewline = trim($overviewline)."\r\n";
fwrite($msgsock, $overviewline, strlen($overviewline));
if(file_exists($overviewfile)) {
$overviewfp=fopen($overviewfile, 'r');
while($overviewline=fgets($overviewfp)) {
$article=preg_split("/[\s,]+/", $overviewline);
for($i=$first; $i<=$last; $i++) {
if($article[0] === strval($i)) {
$overviewline = trim($overviewline)."\r\n";
fwrite($msgsock, $overviewline, strlen($overviewline));
}
}
}
fclose($overviewfp);
}
fclose($overviewfp);
$msg.=".\r\n";
return $msg;
}