diff options
| author | fukachan <fukachan> | 2001-11-03 08:50:38 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-11-03 08:50:38 +0000 |
| commit | 5ac8665164d3dc02c4247d5499b620140d15f419 (patch) | |
| tree | f32adb28679733d8b41dd4b1a7b83afa4fd5dffa | |
| parent | 919875a97da1156bf82a83820b057417227e08fb (diff) | |
| download | fml8-5ac8665164d3dc02c4247d5499b620140d15f419.tar.gz fml8-5ac8665164d3dc02c4247d5499b620140d15f419.tar.bz2 fml8-5ac8665164d3dc02c4247d5499b620140d15f419.zip | |
use article id as thread identifier
| -rw-r--r-- | fml/lib/Mail/ThreadTrack/Analyze.pm | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/fml/lib/Mail/ThreadTrack/Analyze.pm b/fml/lib/Mail/ThreadTrack/Analyze.pm index 869d1e8b..5d92103f 100644 --- a/fml/lib/Mail/ThreadTrack/Analyze.pm +++ b/fml/lib/Mail/ThreadTrack/Analyze.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: Analyze.pm,v 1.5 2001/11/03 02:48:23 fukachan Exp $ +# $FML: Analyze.pm,v 1.6 2001/11/03 07:47:31 fukachan Exp $ # package Mail::ThreadTrack::Analyze; @@ -131,9 +131,7 @@ sub assign else { $self->log("message without thread_id"); - # assign a new thread number for a new message - my $id = $self->increment_id(); - $self->log("assign thread_id=$id"); + my $id = $self->_assign_new_thread_id_number(); # side effect: # define $self->{ _thread_subject_tag } and $self->{ _thread_id } @@ -144,6 +142,30 @@ sub assign } +# Descriptions: +# Arguments: $self +# Side Effects: +# Return Value: number +sub _assign_new_thread_id_number +{ + my ($self) = @_; + my $id = 0; + + # assign a new thread number for a new message + if (1) { + # unique but non sequential number + $id = $self->{ _config }->{ article_id }; + } + else { + # incremental number + $id = $self->increment_id(); + } + + $self->log("assign thread_id=$id"); + return $id; +} + + # Descriptions: update $self->{ _status_info } # Arguments: $self $str # Side Effects: update $self->{ _status_info } |
