Only connect to newsserver if there are approved posts.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
parent
9e5f72b7ea
commit
3680a37aaa
2 changed files with 4 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ huhu 0.11.0 (unreleased)
|
|||
* Add shell to new huhu mod users.
|
||||
* Add wrapper script for read-mail.pl
|
||||
* Drop more headers.
|
||||
* Only connect to newsserver if there are approved posts.
|
||||
|
||||
huhu 0.10 (unknown)
|
||||
* huhu reports version 0.09 (from MOD/Displaylib.pm), but has code
|
||||
|
|
|
|||
|
|
@ -110,7 +110,6 @@ if ($sign_pgpmoose && DEBUG > 1)
|
|||
print "News::Article::sign_pgpmoose enabled.\n";
|
||||
}
|
||||
|
||||
my Net::NNTP $nntp = connect_nntp(\%config);
|
||||
my $dbi = MOD::DBIUtils->new(\%config) ||
|
||||
die "Can't connect to database";
|
||||
|
||||
|
|
@ -118,6 +117,9 @@ my $dbi = MOD::DBIUtils->new(\%config) ||
|
|||
# i.e. all posts in the state 'moderated'.
|
||||
my $dataref = $dbi->select_unposted();
|
||||
|
||||
# Only connect to newsserver if there are approved posts
|
||||
my Net::NNTP $nntp = connect_nntp(\%config) if $dataref->rows;
|
||||
|
||||
#Schleife ueber alle selektierten Postings
|
||||
#Einlesen des Postings, Header anpassen,anschliessend posten
|
||||
#und das das posted-Bit in der Datenbank setzen.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue