More fixes for php8.2
This commit is contained in:
parent
42d8a4bc18
commit
7db2a31bc9
|
@ -232,13 +232,12 @@ function message_post($subject,$from,$newsgroups,$ref,$body,$encryptthis=null,$e
|
|||
$weg=line_read($ns);
|
||||
$t = explode(' ', $weg);
|
||||
if($t[0] != "340") {
|
||||
nntp_close($ns);
|
||||
return $weg;
|
||||
nntp_close($ns);
|
||||
return $weg;
|
||||
}
|
||||
|
||||
|
||||
fputs($ns,'Subject: '.encode_subject($subject)."\r\n");
|
||||
|
||||
// For Synchronet use
|
||||
if (isset($fromname) && (isset($CONFIG['synchronet']) && ($CONFIG['synchronet'] == true))) {
|
||||
// if ( isset($fromname) && isset($CONFIG['synchronet']) ) {
|
||||
|
|
|
@ -194,6 +194,7 @@ function thread_overview_interpret($line,$overviewformat,$groupname) {
|
|||
// $over=explode("\t",$line,count($overviewfmt)-1);
|
||||
$over=explode("\t",$line);
|
||||
//$article=new headerType;
|
||||
$article = (object)[];
|
||||
for ($i=0; $i<count($overviewfmt)-1; $i++) {
|
||||
if ($overviewfmt[$i]=="Subject:") {
|
||||
$subject=preg_replace('/\[doctalk\]/i','',headerDecode($over[$i+1]));
|
||||
|
@ -422,9 +423,9 @@ function thread_load_newsserver(&$ns,$groupname,$poll) {
|
|||
}
|
||||
// write information about the last article to the spool-directory
|
||||
$infofile=fopen($spooldir."/".$groupname."-lastarticleinfo.dat","w");
|
||||
$lastarticleinfo->from=$article->from;
|
||||
$lastarticleinfo->date=$article->date;
|
||||
$lastarticleinfo->name=$article->name;
|
||||
$lastarticleinfo['from']=$article->from;
|
||||
$lastarticleinfo['date']=$article->date;
|
||||
$lastarticleinfo['name']=$article->name;
|
||||
fputs($infofile,serialize($lastarticleinfo));
|
||||
fclose($infofile);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ function import_articles($group) {
|
|||
# Prepare databases
|
||||
// Overview db
|
||||
$new_article_dbh = article_db_open($spooldir.'/'.$group.'-articles.db3-new');
|
||||
$new_article_sql = 'INSERT INTO articles(newsgroup, number, msgid, date, name, subject, article, search_snippet) VALUES(?,?,?,?,?,?,?,?)';
|
||||
$new_article_sql = 'INSERT OR IGNORE INTO articles(newsgroup, number, msgid, date, name, subject, article, search_snippet) VALUES(?,?,?,?,?,?,?,?)';
|
||||
$new_article_stmt = $new_article_dbh->prepare($new_article_sql);
|
||||
$database = $spooldir.'/articles-overview.db3';
|
||||
$table = 'overview';
|
||||
|
@ -69,7 +69,7 @@ function import_articles($group) {
|
|||
$clear_stmt->execute();
|
||||
unlink($overview_file);
|
||||
|
||||
$sql = 'INSERT INTO '.$table.'(newsgroup, number, msgid, date, name, subject) VALUES(?,?,?,?,?,?)';
|
||||
$sql = 'INSERT OR IGNORE INTO '.$table.'(newsgroup, number, msgid, date, name, subject) VALUES(?,?,?,?,?,?)';
|
||||
$stmt = $dbh->prepare($sql);
|
||||
// Incoming db
|
||||
$article_dbh = article_db_open($spooldir.'/'.$group.'-articles.db3');
|
||||
|
|
|
@ -184,7 +184,7 @@ function get_articles($ns, $group) {
|
|||
$stmt = $dbh->prepare($sql);
|
||||
if($CONFIG['article_database'] == '1') {
|
||||
$article_dbh = article_db_open($spooldir.'/'.$group.'-articles.db3');
|
||||
$article_sql = 'INSERT INTO articles(newsgroup, number, msgid, date, name, subject, article, search_snippet) VALUES(?,?,?,?,?,?,?,?)';
|
||||
$article_sql = 'INSERT OR IGNORE INTO articles(newsgroup, number, msgid, date, name, subject, article, search_snippet) VALUES(?,?,?,?,?,?,?,?)';
|
||||
$article_stmt = $article_dbh->prepare($article_sql);
|
||||
}
|
||||
# Pull articles and save them in our spool
|
||||
|
@ -318,7 +318,7 @@ function get_articles($ns, $group) {
|
|||
$bytes = $bytes + ($lines * 2);
|
||||
// Don't spool article if $banned=1
|
||||
if($banned == 1) {
|
||||
@fclose($articleHandle);
|
||||
// @fclose($articleHandle);
|
||||
unlink($grouppath."/".$local);
|
||||
file_put_contents($logfile, "\n".format_log_date()." ".$config_name." Skipping: ".$CONFIG['remote_server']." ".$group.":".$article." user: ".$from[1]." is banned", FILE_APPEND);
|
||||
$article++;
|
||||
|
|
|
@ -126,7 +126,7 @@ echo '</table>';
|
|||
$userfile=$spooldir.'/'.$user.'-articleviews.dat';
|
||||
if(is_file($userfile)) {
|
||||
$userdata = unserialize(file_get_contents($userfile));
|
||||
ksort($userdata);
|
||||
// ksort($userdata);
|
||||
}
|
||||
// Apply Config
|
||||
if(isset($_POST['command']) && $_POST['command'] == 'SaveConfig') {
|
||||
|
|
Loading…
Reference in New Issue