List proper group names and lins in overboard.

This commit is contained in:
Retro_Guy 2024-02-02 10:20:37 -07:00
parent a12dc5414d
commit 025f73cd3e
2 changed files with 24 additions and 13 deletions

View File

@ -1768,7 +1768,8 @@ function get_poster_name($name)
return ($thisposter);
}
function save_config_value($configfile, $name, $value) {
function save_config_value($configfile, $name, $value)
{
$list = file($configfile, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$saveconfig = fopen($configfile, 'w+');
foreach ($list as $save) {
@ -2149,15 +2150,23 @@ function get_db_data_from_msgid($msgid, $group)
}
}
function get_data_from_msgid($msgid)
function get_data_from_msgid($msgid, $thisgroup = null)
{
global $spooldir;
$database = $spooldir . '/articles-overview.db3';
$articles_dbh = overview_db_open($database);
if ($thisgroup != null) {
$articles_query = $articles_dbh->prepare('SELECT * FROM overview WHERE msgid=:messageid AND newsgroup=:newsgroup');
$articles_query->execute([
'messageid' => $msgid,
'newsgroup' => $thisgroup
]);
} else {
$articles_query = $articles_dbh->prepare('SELECT * FROM overview WHERE msgid=:messageid');
$articles_query->execute([
'messageid' => $msgid
]);
}
$found = 0;
while ($row = $articles_query->fetch()) {
$found = 1;
@ -2229,6 +2238,7 @@ function send_admin_message($admin, $from, $subject, $message)
$dbh = null;
return true;
}
function delete_message($messageid, $group, $overview_dbh)
{
global $logfile, $config_dir, $spooldir, $CONFIG, $webserver_group;

View File

@ -57,6 +57,7 @@ if (isset($frames_on) && $frames_on === true) {
}
if (isset($_GET['thisgroup'])) {
$title .= " - " . _rawurldecode(_rawurldecode($_GET['thisgroup'])) . " - latest messages";
$activegroup = urldecode($_GET['thisgroup']);
} else {
$title .= " - " . $config_name . " - overboard";
}
@ -249,7 +250,7 @@ foreach ($files as $article) {
} else {
$threadref = false;
}
$target = get_data_from_msgid($thismsgid);
$target = get_data_from_msgid($thismsgid, $activegroup);
if ($target['date'] > time()) {
continue;
}