diff options
| author | fukachan <fukachan> | 2005-12-19 03:06:02 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2005-12-19 03:06:02 +0000 |
| commit | 91d3d1e7f7da86d4604c8ea8d29930bf1b0c5b12 (patch) | |
| tree | ffd120521412520166c4dad458b3f3844bc150d4 /fml/lib/FML/Process | |
| parent | 6e4af02e9e30d214d5691998434c8d83ed43db21 (diff) | |
| download | fml8-91d3d1e7f7da86d4604c8ea8d29930bf1b0c5b12.tar.gz fml8-91d3d1e7f7da86d4604c8ea8d29930bf1b0c5b12.tar.bz2 fml8-91d3d1e7f7da86d4604c8ea8d29930bf1b0c5b12.zip | |
change is_permit_post() retruns action string not number (0/1) to
support 3 permit/ignore/deny states.
Diffstat (limited to 'fml/lib/FML/Process')
| -rw-r--r-- | fml/lib/FML/Process/Distribute.pm | 9 | ||||
| -rw-r--r-- | fml/lib/FML/Process/Kernel.pm | 8 |
2 files changed, 11 insertions, 6 deletions
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm index 292f1102..136c7dd2 100644 --- a/fml/lib/FML/Process/Distribute.pm +++ b/fml/lib/FML/Process/Distribute.pm @@ -3,7 +3,7 @@ # Copyright (C) 2000,2001,2002,2003,2004,2005 Ken'ichi Fukamachi # All rights reserved. # -# $FML: Distribute.pm,v 1.165 2005/09/14 00:02:37 fukachan Exp $ +# $FML: Distribute.pm,v 1.166 2005/11/30 23:30:38 fukachan Exp $ # package FML::Process::Distribute; @@ -234,9 +234,14 @@ sub run # $curproc->lock(); unless ($curproc->is_refused()) { - if ($curproc->is_permit_post()) { + my $action = $curproc->is_permit_post(); + if ($action eq 'permit') { $curproc->_deliver_article_prep($args); } + elsif ($action eq 'ignore') { + $curproc->log("ignore article submission"); + $curproc->stop_this_process(); + } else { $curproc->logerror("deny article submission"); $curproc->stop_this_process(); diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm index 5b3e2d61..71a64756 100644 --- a/fml/lib/FML/Process/Kernel.pm +++ b/fml/lib/FML/Process/Kernel.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Kernel.pm,v 1.269 2005/11/30 23:30:38 fukachan Exp $ +# $FML: Kernel.pm,v 1.270 2005/12/18 12:24:09 fukachan Exp $ # package FML::Process::Kernel; @@ -1291,7 +1291,7 @@ The restriction rules follows the order of C<article_post_restrictions>. # Descriptions: permit this post process # Arguments: OBJ($curproc) # Side Effects: set the error reason at "check_restriction" in pcb. -# Return Value: NUM(1 or 0) +# Return Value: STR sub is_permit_post { my ($curproc) = @_; @@ -1317,11 +1317,11 @@ sub is_permit_post if ($match) { $curproc->logdebug("match rule=$rule sender=$sender"); - return($result eq "permit" ? 1 : 0); + return($result); } } - return 0; # deny by default + return ''; # deny by default } |
