Clean up overboard.php to remove non-db code

This commit is contained in:
Retro_Guy 2020-12-16 23:41:06 -07:00
parent abd6be4db2
commit 0e6fdb9b1c
1 changed files with 1 additions and 12 deletions

View File

@ -102,17 +102,12 @@ foreach($grouplist as $findgroup) {
$groups = preg_split("/(\ |\t)/", $findgroup, 2); $groups = preg_split("/(\ |\t)/", $findgroup, 2);
$findgroup = $groups[0]; $findgroup = $groups[0];
$none=0;
$overboard_noshow = explode(' ', $CONFIG['overboard_noshow']); $overboard_noshow = explode(' ', $CONFIG['overboard_noshow']);
foreach($overboard_noshow as $noshow) { foreach($overboard_noshow as $noshow) {
if ((strpos($findgroup, $noshow) !== false) && !isset($_GET['thisgroup'])) { if ((strpos($findgroup, $noshow) !== false) && !isset($_GET['thisgroup'])) {
$none=1; continue 2;
break;
} }
} }
if($none == 1) {
continue;
}
$thisgroup = preg_replace('/\./', '/', $findgroup); $thisgroup = preg_replace('/\./', '/', $findgroup);
if (!is_dir($spoolpath.$thisgroup)) { if (!is_dir($spoolpath.$thisgroup)) {
continue; continue;
@ -122,13 +117,7 @@ foreach($grouplist as $findgroup) {
if($dbh) { if($dbh) {
$query->execute(['findgroup' => $findgroup]); $query->execute(['findgroup' => $findgroup]);
while (($overviewline = $query->fetch()) !== false) { while (($overviewline = $query->fetch()) !== false) {
if($overviewline['date'] < $oldest) {
continue 2;
}
if(stripos($overviewline['newsgroup'], $findgroup) !== false) {
$articles[] = $spoolpath.$thisgroup.'/'.$overviewline['number']; $articles[] = $spoolpath.$thisgroup.'/'.$overviewline['number'];
}
} }
} }
} }