diff options
| author | fukachan <fukachan> | 2004-03-28 10:28:23 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2004-03-28 10:28:23 +0000 |
| commit | 43cbeb0c6f7ec2b6fb1d8755f5309818d5380abd (patch) | |
| tree | 9fe2946ea4e9e517f7ba0c5e1f3c5ffd7fd4457d /fml/lib | |
| parent | eae1f56a1dd3a82199d27d24f2228805010d5ae8 (diff) | |
| download | fml8-43cbeb0c6f7ec2b6fb1d8755f5309818d5380abd.tar.gz fml8-43cbeb0c6f7ec2b6fb1d8755f5309818d5380abd.tar.bz2 fml8-43cbeb0c6f7ec2b6fb1d8755f5309818d5380abd.zip | |
define new db: thread_status article_status
implement new methods: set_thread_status(), get_thread_status(),
set_article_status() and get_article_status().
Diffstat (limited to 'fml/lib')
| -rw-r--r-- | fml/lib/Mail/Message/DB.pm | 7 | ||||
| -rw-r--r-- | fml/lib/Mail/Message/Thread.pm | 59 |
2 files changed, 63 insertions, 3 deletions
diff --git a/fml/lib/Mail/Message/DB.pm b/fml/lib/Mail/Message/DB.pm index 55edb943..58f4ff4f 100644 --- a/fml/lib/Mail/Message/DB.pm +++ b/fml/lib/Mail/Message/DB.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: DB.pm,v 1.15 2004/03/24 01:32:03 fukachan Exp $ +# $FML: DB.pm,v 1.16 2004/03/27 09:28:06 fukachan Exp $ # package Mail::Message::DB; @@ -21,7 +21,7 @@ use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD use Carp; use File::Spec; -my $version = q$FML: DB.pm,v 1.15 2004/03/24 01:32:03 fukachan Exp $; +my $version = q$FML: DB.pm,v 1.16 2004/03/27 09:28:06 fukachan Exp $; if ($version =~ /,v\s+([\d\.]+)\s+/) { $version = $1;} # special value @@ -78,6 +78,9 @@ my $is_demand_copying = 1; inv_month hint + + thread_status + article_status ); diff --git a/fml/lib/Mail/Message/Thread.pm b/fml/lib/Mail/Message/Thread.pm index 5b6ffc9a..b0d04a5f 100644 --- a/fml/lib/Mail/Message/Thread.pm +++ b/fml/lib/Mail/Message/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.2 2003/07/20 06:43:26 fukachan Exp $ +# $FML: Thread.pm,v 1.3 2004/03/27 09:23:07 fukachan Exp $ # package Mail::Message::Thread; @@ -165,6 +165,63 @@ sub get_thread_member_as_array_ref } +=head1 UTILITY + +=cut + + +# Descriptions: set thread status. +# Arguments: OBJ($self) NUM($head_id) STR($status) +# Side Effects: update UDB +# Return Value: none +sub set_thread_status +{ + my ($self, $head_id, $status) = @_; + my $db = $self->db(); + + $db->set('thread_status', $head_id, $status); +} + + +# Descriptions: get thread status. +# Arguments: OBJ($self) NUM($head_id) +# Side Effects: none +# Return Value: STR +sub get_thread_status +{ + my ($self, $head_id) = @_; + my $db = $self->db(); + + $db->get('thread_status', $head_id); +} + + +# Descriptions: set thread status. +# Arguments: OBJ($self) NUM($id) STR($status) +# Side Effects: update UDB +# Return Value: none +sub set_article_status +{ + my ($self, $id, $status) = @_; + my $db = $self->db(); + + $db->set('article_status', $id, $status); +} + + +# Descriptions: get article status. +# Arguments: OBJ($self) NUM($id) +# Side Effects: none +# Return Value: STR +sub get_article_status +{ + my ($self, $id) = @_; + my $db = $self->db(); + + $db->get('article_status', $id); +} + + =head1 TODO =head1 CODING STYLE |
