summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-11-24 02:52:43 +0000
committerfukachan <fukachan>2002-11-24 02:52:43 +0000
commit6daf291fdfd5d8ec88d3de72ddf71194ffccd00d (patch)
tree1ff40456b9f66168fd557cb12c5c4e0120dacbf6 /fml
parentcde3c3784e1692ca70f41f8e0fbed31303e4e2d7 (diff)
downloadfml8-6daf291fdfd5d8ec88d3de72ddf71194ffccd00d.tar.gz
fml8-6daf291fdfd5d8ec88d3de72ddf71194ffccd00d.tar.bz2
fml8-6daf291fdfd5d8ec88d3de72ddf71194ffccd00d.zip
wrapper to digest off/on
Diffstat (limited to 'fml')
-rw-r--r--fml/lib/FML/Command/Admin/digestoff.pm116
-rw-r--r--fml/lib/FML/Command/Admin/digeston.pm116
2 files changed, 232 insertions, 0 deletions
diff --git a/fml/lib/FML/Command/Admin/digestoff.pm b/fml/lib/FML/Command/Admin/digestoff.pm
new file mode 100644
index 00000000..0d9355d6
--- /dev/null
+++ b/fml/lib/FML/Command/Admin/digestoff.pm
@@ -0,0 +1,116 @@
+#-*- perl -*-
+#
+# Copyright (C) 2002 Ken'ichi Fukamachi
+# All rights reserved. This program is free software; you can
+# redistribute it and/or modify it under the same terms as Perl itself.
+#
+# $FML: digest.pm,v 1.2 2002/11/23 13:12:47 fukachan Exp $
+#
+
+package FML::Command::Admin::digestoff;
+use strict;
+use Carp;
+use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
+
+
+=head1 NAME
+
+FML::Command::Admin::digest - digest mode on
+
+=head1 SYNOPSIS
+
+See C<FML::Command> for more details.
+
+=head1 DESCRIPTION
+
+change digest mode for the specified address to off/on.
+
+=head1 METHODS
+
+=head2 C<process($curproc, $command_args)>
+
+=cut
+
+
+# Descriptions: standard constructor
+# Arguments: OBJ($self)
+# Side Effects: none
+# Return Value: OBJ
+sub new
+{
+ my ($self) = @_;
+ my ($type) = ref($self) || $self;
+ my $me = {};
+ return bless $me, $type;
+}
+
+
+# Descriptions: need lock or not
+# Arguments: none
+# Side Effects: none
+# Return Value: NUM( 1 or 0)
+sub need_lock { 1;}
+
+
+# Descriptions: change on or off digest mode
+# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
+# Side Effects: update $recipient_map,$digest_recipient_maps
+sub process
+{
+ my ($self, $curproc, $command_args) = @_;
+ my $options = $command_args->{ options } || [];
+ my $address = $command_args->{ command_data } || $options->[ 0 ] || undef;
+
+ # mode off
+ $options->[ 1 ] = "off";
+
+ use FML::Command::Admin::digest;
+ my $digest = new FML::Command::Admin::digest;
+ $digest->process($curproc, $command_args);
+}
+
+
+# Descriptions: show cgi menu for on
+# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
+# Side Effects: update $recipient_map
+# Return Value: none
+sub cgi_menu
+{
+ my ($self, $curproc, $args, $command_args) = @_;
+ my $r = '';
+
+ eval q{
+ use FML::CGI::Admin::User;
+ my $obj = new FML::CGI::Admin::User;
+ $obj->cgi_menu($curproc, $args, $command_args);
+ };
+ if ($r = $@) {
+ croak($r);
+ }
+}
+
+
+=head1 CODING STYLE
+
+See C<http://www.fml.org/software/FNF/> on fml coding style guide.
+
+=head1 AUTHOR
+
+Ken'ichi Fukamachi
+
+=head1 COPYRIGHT
+
+Copyright (C) 2002 Ken'ichi Fukamachi
+
+All rights reserved. This program is free software; you can
+redistribute it and/or modify it under the same terms as Perl itself.
+
+=head1 HISTORY
+
+FML::Command::Admin::on first appeared in fml8 mailing list driver package.
+See C<http://www.fml.org/> for more details.
+
+=cut
+
+
+1;
diff --git a/fml/lib/FML/Command/Admin/digeston.pm b/fml/lib/FML/Command/Admin/digeston.pm
new file mode 100644
index 00000000..123ff59b
--- /dev/null
+++ b/fml/lib/FML/Command/Admin/digeston.pm
@@ -0,0 +1,116 @@
+#-*- perl -*-
+#
+# Copyright (C) 2002 Ken'ichi Fukamachi
+# All rights reserved. This program is free software; you can
+# redistribute it and/or modify it under the same terms as Perl itself.
+#
+# $FML: digest.pm,v 1.2 2002/11/23 13:12:47 fukachan Exp $
+#
+
+package FML::Command::Admin::digeston;
+use strict;
+use Carp;
+use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD);
+
+
+=head1 NAME
+
+FML::Command::Admin::digest - digest mode on
+
+=head1 SYNOPSIS
+
+See C<FML::Command> for more details.
+
+=head1 DESCRIPTION
+
+change digest mode for the specified address to off/on.
+
+=head1 METHODS
+
+=head2 C<process($curproc, $command_args)>
+
+=cut
+
+
+# Descriptions: standard constructor
+# Arguments: OBJ($self)
+# Side Effects: none
+# Return Value: OBJ
+sub new
+{
+ my ($self) = @_;
+ my ($type) = ref($self) || $self;
+ my $me = {};
+ return bless $me, $type;
+}
+
+
+# Descriptions: need lock or not
+# Arguments: none
+# Side Effects: none
+# Return Value: NUM( 1 or 0)
+sub need_lock { 1;}
+
+
+# Descriptions: change on or off digest mode
+# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
+# Side Effects: update $recipient_map,$digest_recipient_maps
+sub process
+{
+ my ($self, $curproc, $command_args) = @_;
+ my $options = $command_args->{ options } || [];
+ my $address = $command_args->{ command_data } || $options->[ 0 ] || undef;
+
+ # mode on
+ $options->[ 1 ] = "on";
+
+ use FML::Command::Admin::digest;
+ my $digest = new FML::Command::Admin::digest;
+ $digest->process($curproc, $command_args);
+}
+
+
+# Descriptions: show cgi menu for on
+# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
+# Side Effects: update $recipient_map
+# Return Value: none
+sub cgi_menu
+{
+ my ($self, $curproc, $args, $command_args) = @_;
+ my $r = '';
+
+ eval q{
+ use FML::CGI::Admin::User;
+ my $obj = new FML::CGI::Admin::User;
+ $obj->cgi_menu($curproc, $args, $command_args);
+ };
+ if ($r = $@) {
+ croak($r);
+ }
+}
+
+
+=head1 CODING STYLE
+
+See C<http://www.fml.org/software/FNF/> on fml coding style guide.
+
+=head1 AUTHOR
+
+Ken'ichi Fukamachi
+
+=head1 COPYRIGHT
+
+Copyright (C) 2002 Ken'ichi Fukamachi
+
+All rights reserved. This program is free software; you can
+redistribute it and/or modify it under the same terms as Perl itself.
+
+=head1 HISTORY
+
+FML::Command::Admin::on first appeared in fml8 mailing list driver package.
+See C<http://www.fml.org/> for more details.
+
+=cut
+
+
+1;