diff --git a/Rocksolid_Light/rocksolid/lib/post.inc.php b/Rocksolid_Light/rocksolid/lib/post.inc.php index 2f93f97..809c6ed 100755 --- a/Rocksolid_Light/rocksolid/lib/post.inc.php +++ b/Rocksolid_Light/rocksolid/lib/post.inc.php @@ -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']) ) { diff --git a/Rocksolid_Light/rocksolid/lib/thread.inc.php b/Rocksolid_Light/rocksolid/lib/thread.inc.php index e4f7f64..dc4ebed 100644 --- a/Rocksolid_Light/rocksolid/lib/thread.inc.php +++ b/Rocksolid_Light/rocksolid/lib/thread.inc.php @@ -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; $ifrom=$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); } diff --git a/Rocksolid_Light/rslight/scripts/import-db3.php b/Rocksolid_Light/rslight/scripts/import-db3.php index 31faca7..7ebe3c9 100755 --- a/Rocksolid_Light/rslight/scripts/import-db3.php +++ b/Rocksolid_Light/rslight/scripts/import-db3.php @@ -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'); diff --git a/Rocksolid_Light/rslight/scripts/spoolnews.php b/Rocksolid_Light/rslight/scripts/spoolnews.php index ae1374a..9b3bff7 100755 --- a/Rocksolid_Light/rslight/scripts/spoolnews.php +++ b/Rocksolid_Light/rslight/scripts/spoolnews.php @@ -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++; diff --git a/Rocksolid_Light/spoolnews/user.php b/Rocksolid_Light/spoolnews/user.php index 45c22d6..8bdf653 100644 --- a/Rocksolid_Light/spoolnews/user.php +++ b/Rocksolid_Light/spoolnews/user.php @@ -126,7 +126,7 @@ echo ''; $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') {