summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Process
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-11-30 23:30:38 +0000
committerfukachan <fukachan>2005-11-30 23:30:38 +0000
commitb2ec034ac5748f97a2cbb0e811c355312e31c605 (patch)
tree341b2b814ec6330230f7460db287c79e7ff93f65 /fml/lib/FML/Process
parent8739d241ca3947fe11d625d30f752fe3e6552aeb (diff)
downloadfml8-b2ec034ac5748f97a2cbb0e811c355312e31c605.tar.gz
fml8-b2ec034ac5748f97a2cbb0e811c355312e31c605.tar.bz2
fml8-b2ec034ac5748f97a2cbb0e811c355312e31c605.zip
use $curproc->credential();
Diffstat (limited to 'fml/lib/FML/Process')
-rw-r--r--fml/lib/FML/Process/Command.pm6
-rw-r--r--fml/lib/FML/Process/Distribute.pm7
-rw-r--r--fml/lib/FML/Process/Kernel.pm23
-rw-r--r--fml/lib/FML/Process/QueueManager.pm4
4 files changed, 23 insertions, 17 deletions
diff --git a/fml/lib/FML/Process/Command.pm b/fml/lib/FML/Process/Command.pm
index 23591905..104eca98 100644
--- a/fml/lib/FML/Process/Command.pm
+++ b/fml/lib/FML/Process/Command.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002,2003,2004,2005 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Command.pm,v 1.113 2005/06/04 08:49:08 fukachan Exp $
+# $FML: Command.pm,v 1.114 2005/08/10 15:03:24 fukachan Exp $
#
package FML::Process::Command;
@@ -347,7 +347,7 @@ sub _command_switch
my ($curproc, $context) = @_;
my $config = $curproc->config();
my $prompt = $config->{ command_mail_reply_prompt } || '>>>';
- my $cred = $curproc->{ credential }; # user credential
+ my $cred = $curproc->credential(); # user credential
my $sender = $cred->sender();
my $comname = $context->{ comname };
my $msg_args = $context->{ msg_args } || {};
@@ -422,7 +422,7 @@ sub _command_execute
my ($curproc, $command_args) = @_;
my $config = $curproc->config();
my $prompt = $config->{ command_mail_reply_prompt } || '>>>';
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $sender = $cred->sender();
my $msg_args = $command_args->{ msg_args } || {};
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index 6b743d24..292f1102 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.164 2005/09/11 13:14:15 fukachan Exp $
+# $FML: Distribute.pm,v 1.165 2005/09/14 00:02:37 fukachan Exp $
#
package FML::Process::Distribute;
@@ -216,7 +216,8 @@ sub run
my ($curproc, $args) = @_;
my $config = $curproc->config();
my $maintainer = $config->{ maintainer };
- my $sender = $curproc->{'credential'}->{'sender'};
+ my $cred = $curproc->credential();
+ my $sender = $cred->sender();
my $_data_type =
$config->{ article_post_restrictions_reject_notice_data_type };
my $data_type = $_data_type || 'string';
@@ -512,7 +513,7 @@ sub _header_rewrite
sub _deliver_article
{
my ($curproc) = @_;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $config = $curproc->config(); # FML::Config object
my $message = $curproc->article_message(); # Mail::Message object
my $header = $curproc->article_message_header(); # FML::Header object
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index 39c29c81..c57047e6 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.267 2005/08/19 11:23:02 fukachan Exp $
+# $FML: Kernel.pm,v 1.268 2005/08/19 12:17:09 fukachan Exp $
#
package FML::Process::Kernel;
@@ -265,7 +265,7 @@ sub _credential_init
use FML::Credential;
my $cred = new FML::Credential $curproc;
- $curproc->{'credential'} = $cred;
+ $curproc->{ 'credential' } = $cred;
}
@@ -559,7 +559,7 @@ sub _init_event_timeout
=head2 credential_verify_sender($args)
validate the mail sender (From: in the header not SMTP SENEDER). If
-valid, it sets the adddress within $curproc->{ credential } object as
+valid, it sets the adddress within $curproc->credential() object as
a side effect.
=cut
@@ -609,7 +609,8 @@ sub credential_verify_sender
my $safe = new FML::Restriction::Base;
if ($safe->regexp_match('address', $from)) {
# o.k. From: is proven to be valid now.
- $curproc->{'credential'}->set( 'sender', $from );
+ my $cred = $curproc->credential();
+ $cred->set( 'sender', $from );
}
else {
$curproc->stop_this_process();
@@ -1040,7 +1041,7 @@ sub config_cf_files_load
}
use FML::Credential;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $s = "configuration error: \$maintainer == \$article_post_address";
if ($maintainer && $ml_address) {
if ($cred->is_same_address($maintainer, $ml_address)) {
@@ -1292,7 +1293,7 @@ sub is_permit_post
{
my ($curproc) = @_;
my $config = $curproc->config();
- my $cred = $curproc->{ credential }; # user credential
+ my $cred = $curproc->credential(); # user credential
my $sender = $cred->sender();
my $rules = $config->get_as_array_ref( "article_post_restrictions" );
@@ -1782,7 +1783,9 @@ sub _analyze_recipients
# if both specified, use default sender.
unless (@$recipient || @$recipient_maps) {
- $recipient = [ $curproc->{ credential }->sender() ];
+ my $cred = $curproc->credential();
+ my $sender = $cred->sender();
+ $recipient = [ $sender ];
}
# aggregation of recepients: [ A, A, B ] -> [ A, B ]
@@ -2448,8 +2451,10 @@ sub queue_in
# default recipient if undefined.
unless ($rcptkey) {
- if (defined $curproc->{ credential }) {
- $rcptkey = $curproc->{ credential }->sender();
+ my $cred = $curproc->credential();
+ my $sender = $cred->sender() || undef;
+ if (defined $cred) {
+ $rcptkey = $sender;
}
}
diff --git a/fml/lib/FML/Process/QueueManager.pm b/fml/lib/FML/Process/QueueManager.pm
index 624b8296..c2c8dcad 100644
--- a/fml/lib/FML/Process/QueueManager.pm
+++ b/fml/lib/FML/Process/QueueManager.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: QueueManager.pm,v 1.35 2005/05/27 03:03:37 fukachan Exp $
+# $FML: QueueManager.pm,v 1.36 2005/06/04 01:35:25 fukachan Exp $
#
package FML::Process::QueueManager;
@@ -170,7 +170,7 @@ sub send
sub _send
{
my ($self, $curproc, $q) = @_;
- my $cred = $curproc->{ credential };
+ my $cred = $curproc->credential();
my $info = $q->getidinfo();
my $qfile = $info->{ 'path' };
my $qid = $info->{ 'id' };