X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~webstump/git?a=blobdiff_plain;f=webstump%2Fscripts%2Fhtml_output.pl;h=728bd711d42fd3c153b1598b09598af096318da5;hb=1cb218f80055e4032bc11da318b8360872e1cfb9;hp=04cddcc6c70e928d229a063ff4885bd101e73ad8;hpb=5421d6171a44b0e8b16e111814a4cf42970cca63;p=modbot-uram.git diff --git a/webstump/scripts/html_output.pl b/webstump/scripts/html_output.pl index 04cddcc..728bd71 100644 --- a/webstump/scripts/html_output.pl +++ b/webstump/scripts/html_output.pl @@ -193,7 +193,7 @@ of this installation.
&end_html; } -# main moderation page -- old version +# main moderation page -- single-article version sub html_moderate_article { my $newsgroup = &required_parameter( 'newsgroup' ); my $moderator = $request{'moderator'}; @@ -211,7 +211,7 @@ sub html_moderate_article { print "
\n" if &print_article_warning( $file ); - print "
\n";
+      print "
\n";
       my $filename;
       my $inhead= 1;
       while( $filename =  ) {
@@ -247,45 +247,31 @@ sub html_moderate_article {
   &html_print_credentials;
   print "
Comment:
"; + foreach (@short_rejection_reasons) { + print "\n"; + } + print "
Comment (to poster, in rejection message):
"; print "
Don't change poster's status White-list poster - Ban All Posts by this Person (Careful!) -

-Don't change thread's status - -
- -Ban Entire Thread By Subject (Careful!) -Put Entire thread on a Watch, by Subject: + +Add poster to watch list

-NOTE: Decisions to ban and preapprove posters and threads can be reversed by -logging in as \"admin\" and editing respective lists of preapproved -and banned threads and posters. +NOTE: Decisions to watchlist and whitelist posters can be reversed by +editing the respective lists of whitelisted and watchlisted posters. "; &link_to_help( "filter-lists", "automatic filtering and filter lists, blacklisting and preapproved threads." ); - print "Be really careful about blacklisting of everyone except spammers.

+ print "You may also wish to read the summary of rejection reasons (opens in a new window).\n

Review ONE article in next screen @@ -299,6 +285,11 @@ and banned threads and posters. "; print "\n\n"; + print "
"; + &html_print_credentials; + print " + +
"; print "
Change Password"; @@ -478,7 +469,7 @@ sub get_queue_list ($) { return ($dir, @articles); } -# main moderation page +# main moderation page -- multiple-articles version sub html_moderation_screen { my $newsgroup = &required_parameter( 'newsgroup' ); my $moderator = $request{'moderator'}; @@ -519,7 +510,7 @@ decision (approve/reject etc) and click submit. For those messages which you would like to review in more details, do not select anything and use Review/Comment function from this screen or from a subsequent screen. Remember that if you do not make any decision, the article would stay in the -queue.\n"; +queue. See also the summary of rejection reasons (opens in a new window).\n"; &read_rejection_reasons; @@ -529,6 +520,10 @@ queue.\n";
"; &html_print_credentials; + + print "
+ +"; my $file, $subject = "No Subject", $from = "From nobody"; my $form_not_empty = ""; @@ -558,7 +553,7 @@ queue.\n"; print "
$from: $subject("; print "Review/Comment/Preapprove)
\n"; + "moderator=$moderator&password=$password&file=$subdir>Review/Comment/Whitelist)
\n"; print "Approve\n"; print "Leave\n"; print "Back of queue\n"; @@ -574,7 +569,7 @@ queue.\n"; my $i = 0; - while( ($_ = ) && $i < 5 ) { + while( ($_ = ) && $i < 8 ) { chop; next if m/^\>/; s/\&/&/g; @@ -640,22 +635,24 @@ sub scanlogs ($$$) { my $num= sub { local ($_) = @_; return $forwards * ( - m/^errs$/ ? -1 : - m/^errs\.(\d+)(?:\.gz$)$/ ? $1 : - undef + m/^errs$/ ? 1 : + m/^errs\.(\d+)(?:\.gz$)$/ ? ($1+2) : + 0 ); }; foreach my $leaf ( sort { $num->($a) <=> $num->($b) } - grep { defined $num->($_) } + grep { $num->($_) } readdir LOGSDIR ) { my $file= "$dir/$leaf"; - if ($file =~ m/\.gz$/) { - open LOGFILE, "zcat $file |" or die "zcat $file $!"; + if ($file =~ m/\/errs.*\.gz$/) { + open LOGFILE, "zcat $file | tac |" or die "zcat $file | tac $!"; + } elsif ($file =~ /errs/) { + open LOGFILE, "tac $file |" or die "tac $file $!"; } else { - open LOGFILE, "< $file" or die "$file $!"; - } + die "Unexpected filename in scanlogs: $file"; + } while () { my $tgot= $callback->(); next unless $tgot; @@ -765,12 +762,7 @@ sub html_newsgroup_management { "; + &end_html; }