From 2f291dddf5c567ad6aad1536c7d56c2b4767ef94 Mon Sep 17 00:00:00 2001 From: Retro_Guy Date: Sat, 26 Aug 2023 04:41:26 -0700 Subject: [PATCH] Prefer articles dbs over overview db for speed. --- Rocksolid_Light/rocksolid/newsportal.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Rocksolid_Light/rocksolid/newsportal.php b/Rocksolid_Light/rocksolid/newsportal.php index 610679c..3f415af 100644 --- a/Rocksolid_Light/rocksolid/newsportal.php +++ b/Rocksolid_Light/rocksolid/newsportal.php @@ -658,13 +658,17 @@ function groups_show($gruppen) */ // if ($lastarticleinfo['date'] < 1) { // Look up last article info for group (np does not write lastarticleinfo.dat properly for some reason) - $database = $spooldir . '/articles-overview.db3'; - $table = 'overview'; - $articles_dbh = overview_db_open($database); - $articles_query = $articles_dbh->prepare('SELECT * FROM overview WHERE newsgroup=:group ORDER BY date DESC LIMIT 2'); + $database = $spooldir . '/'.$g->name.'-articles.db3'; + $table = 'articles'; + $articles_dbh = article_db_open($database); + $articles_query = $articles_dbh->prepare('SELECT * FROM articles ORDER BY date DESC LIMIT 2'); + // $articles_query = $articles_dbh->prepare('SELECT * FROM articles WHERE newsgroup=:group ORDER BY date DESC LIMIT 2'); + $articles_query->execute(); + /* $articles_query->execute([ 'group' => $g->name ]); + */ $found = 0; while ($row = $articles_query->fetch()) { $found = 1;