From aecbe2a5a9bbcd29e932111137e02dc54a3a1b5a Mon Sep 17 00:00:00 2001 From: Jeff Date: Thu, 3 Aug 2017 21:57:59 -0400 Subject: [PATCH] do not use banned newsgroups --- contrib/backends/srndv2/src/srnd/postgres.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/backends/srndv2/src/srnd/postgres.go b/contrib/backends/srndv2/src/srnd/postgres.go index 74b60a2..2fbbf82 100644 --- a/contrib/backends/srndv2/src/srnd/postgres.go +++ b/contrib/backends/srndv2/src/srnd/postgres.go @@ -150,7 +150,7 @@ func (self *PostgresDatabase) prepareStatements() { self.stmt = map[string]string{ NewsgroupBanned: "SELECT COUNT(newsgroup) FROM BannedGroups WHERE newsgroup = $1", ArticleBanned: "SELECT COUNT(message_id) FROM BannedArticles WHERE message_id = $1", - GetAllNewsgroups: "SELECT name FROM Newsgroups", + GetAllNewsgroups: "SELECT name FROM Newsgroups WHERE name NOT IN ( SELECT newsgroup FROM BannedGroups )", GetPostsInGroup: "SELECT newsgroup, message_id, ref_id, name, subject, path, time_posted, message, addr FROM ArticlePosts WHERE newsgroup = $1 ORDER BY time_posted", GetPostModel: "SELECT newsgroup, message_id, ref_id, name, subject, path, time_posted, message, addr FROM ArticlePosts WHERE message_id = $1 LIMIT 1", GetArticlePubkey: "SELECT pubkey FROM ArticleKeys WHERE message_id = $1",