summaryrefslogtreecommitdiff
path: root/fml/lib/FML/Command
diff options
context:
space:
mode:
authorfukachan <fukachan>2004-03-31 12:53:50 +0000
committerfukachan <fukachan>2004-03-31 12:53:50 +0000
commit5432a7011fcb4386b56fc044a54ec4c4dd2da0e5 (patch)
tree0d73b11db0e7a903d7b020323b97f6aaaa8cd10d /fml/lib/FML/Command
parent408f950159c3aae27154eaaceb15d6d91095d9d9 (diff)
downloadfml8-5432a7011fcb4386b56fc044a54ec4c4dd2da0e5.tar.gz
fml8-5432a7011fcb4386b56fc044a54ec4c4dd2da0e5.tar.bz2
fml8-5432a7011fcb4386b56fc044a54ec4c4dd2da0e5.zip
Mail::ThreadTrack is obsoleted. remove related codes.
Diffstat (limited to 'fml/lib/FML/Command')
-rw-r--r--fml/lib/FML/Command/Admin/thread.pm116
1 files changed, 1 insertions, 115 deletions
diff --git a/fml/lib/FML/Command/Admin/thread.pm b/fml/lib/FML/Command/Admin/thread.pm
index b6038ee8..f3876af0 100644
--- a/fml/lib/FML/Command/Admin/thread.pm
+++ b/fml/lib/FML/Command/Admin/thread.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: thread.pm,v 1.5 2004/03/28 13:05:55 fukachan Exp $
+# $FML: thread.pm,v 1.6 2004/03/29 14:13:20 fukachan Exp $
#
package FML::Command::Admin::thread;
@@ -126,120 +126,6 @@ sub _new_switch
}
-=head1 OLD VERSION
-
-=cut
-
-
-# Descriptions: thread manipulation interface.
-# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
-# Side Effects: update $recipient_map
-# Return Value: none
-sub old_process
-{
- my ($self, $curproc, $command_args) = @_;
- my $config = $curproc->config();
- my $myname = $curproc->myname();
-
- # prepare argumente for thread track module (Mail::ThreadTrack).
- my $ml_name = $config->{ ml_name };
- my $thread_db_dir = $config->{ thread_db_dir };
- my $spool_dir = $config->{ spool_dir };
- my $max_id = $curproc->article_max_id();
- my $ttargs = {
- myname => $myname,
- logfp => \&Log,
- fd => \*STDOUT,
- db_base_dir => $thread_db_dir,
- ml_name => $ml_name,
- spool_dir => $spool_dir,
- max_id => $max_id,
- reverse_order => 1,
- };
-
- # if (defined $options->{ f }) {
- # _read_filter_list($thread, $options->{ f });
- # }
-
- $self->_old_switch($curproc, $command_args, $ttargs);
-}
-
-
-# Descriptions: switch thread library command
-# Arguments: OBJ($self) OBJ($curproc) HASH_REF($command_args)
-# HASH_REF($ttargs)
-# Side Effects: thread db may be updated
-# Return Value: none
-sub _old_switch
-{
- my ($self, $curproc, $command_args, $ttargs) = @_;
- my $options = $command_args->{ options };
- my $command = $options->[ 0 ] || 'list';
- my $max_id = $ttargs->{ max_id };
-
- # utility functions for spool in fml side.
- use FML::Article::Thread;
- my $a_thread = new FML::Article::Thread $curproc;
-
- # functions to manipulate thread db.
- use Mail::ThreadTrack;
- my $thread = new Mail::ThreadTrack $ttargs;
- $thread->set_mode('text');
-
- if ($command eq 'list' || $command eq 'summary') {
- $thread->$command();
- }
- elsif ($command eq 'review') {
- my $str = $options->[ 1 ] || 'last:100';
- $thread->review( $str , 1, $max_id );
- }
- elsif ($command eq 'db_dump') {
- my $type = $options->[ 1 ] || 'status';
- $thread->db_open();
- $thread->db_dump( $type );
- $thread->db_close();
- }
- elsif ($command eq 'db_update') {
- my $last_id = $a_thread->speculate_last_id($curproc, $thread);
- print STDERR "db_update: $last_id -> $max_id\n";
- $thread->db_mkdb($last_id, $max_id);
- }
- elsif ($command eq 'db_rebuild') {
- print STDERR "\$thread->db_mkdb(1, $max_id);\n";
- $thread->db_mkdb(1, $max_id);
- }
- elsif ($command eq 'db_clear') {
- $thread->db_open();
- $thread->db_clear();
- $thread->db_close();
- }
- elsif ($command eq 'close') {
- my $thread_id = $options->[ 1 ];
- if (defined $thread_id) {
- $a_thread->close($thread, $thread_id, 1, $max_id);
- }
- else {
- croak("specify \$thread_id");
- }
- }
- elsif ($command eq 'cui') {
- # XXX-TODO: hmm, run interactive session unless @ARGV ?
- # XXX-TODO: showing help is appropriate ?
- if ($options->[ 1 ]) {
- push(@ISA, 'FML::Article::Thread::CUI');
- # $ttargs->{ ml_name } = $argv->[ 0 ];
- $a_thread->interactive($thread, $ttargs);
- }
- else {
- help();
- }
- }
- else {
- croak("subcommand not specified");
- }
-}
-
-
=head1 CODING STYLE
See C<http://www.fml.org/software/FNF/> on fml coding style guide.