Add logging for db3 write errors in spoolnews.php.
This commit is contained in:
parent
594b50dd7f
commit
0dbafa27fa
|
@ -2172,6 +2172,9 @@ function insert_article_from_array($this_article, $check_duplicates = true)
|
|||
// Open articles Database
|
||||
if ($CONFIG['article_database'] == '1') {
|
||||
$article_dbh = article_db_open($spooldir . '/' . $group . '-articles.db3');
|
||||
if(!$article_dbh) {
|
||||
return "441 Cannot open " . $spooldir . '/' . $group . "-articles.db3\r\n";
|
||||
}
|
||||
$article_sql = 'INSERT OR IGNORE INTO articles(newsgroup, number, msgid, date, name, subject, article, search_snippet) VALUES(?,?,?,?,?,?,?,?)';
|
||||
$article_stmt = $article_dbh->prepare($article_sql);
|
||||
}
|
||||
|
@ -2179,6 +2182,10 @@ function insert_article_from_array($this_article, $check_duplicates = true)
|
|||
$database = $spooldir . '/articles-overview.db3';
|
||||
$table = 'overview';
|
||||
$overview_dbh = overview_db_open($database, $table);
|
||||
if(!$overview_dbh) {
|
||||
$article_dbh = null;
|
||||
return "441 Cannot open " . $database . "\r\n";
|
||||
}
|
||||
$overview_sql = 'INSERT OR IGNORE INTO overview(newsgroup, number, msgid, date, datestring, name, subject, refs, bytes, lines, xref) VALUES(?,?,?,?,?,?,?,?,?,?,?)';
|
||||
$overview_stmt = $overview_dbh->prepare($overview_sql);
|
||||
|
||||
|
|
Loading…
Reference in New Issue