|
From: <ssc...@us...> - 2003-07-13 09:13:16
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv30312
Modified Files:
HTML.pm
Log Message:
[ 769688 ] 0.19.0: Message ID lost when message comes while using cc.
Fixed.
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.180
retrieving revision 1.181
diff -C2 -d -r1.180 -r1.181
*** HTML.pm 12 Jul 2003 00:22:32 -0000 1.180
--- HTML.pm 13 Jul 2003 09:13:12 -0000 1.181
***************
*** 87,90 ****
--- 87,96 ----
$self->{need_resort__} = 0;
+ # Hash containing pre-cached messages loaded upon receipt of NEWFL message. Moved to
+ # $self->{history_keys__} on each invocation of the history page.
+ # Structure is identical to $self->{history_keys__}
+
+ $self->{history_pre_cache__} = {};
+
# A hash containing a mapping between alphanumeric identifiers and appropriate strings used
# for localization. The string may contain sprintf patterns for use in creating grammatically
***************
*** 2422,2429 ****
if ( $first =~ /___HISTORY__ __ VERSION__ 1/ ) {
while ( my $line = <CACHE> ) {
! if ( !( $line =~ /__HISTORY__ __BOUNDARY__/ ) ) {
$self->log_( "Problem in history_cache file, expecting boundary got $line" );
last;
! }
$line = <CACHE>;
--- 2428,2435 ----
if ( $first =~ /___HISTORY__ __ VERSION__ 1/ ) {
while ( my $line = <CACHE> ) {
! if ( !( $line =~ /__HISTORY__ __BOUNDARY__/ ) ) {
$self->log_( "Problem in history_cache file, expecting boundary got $line" );
last;
! }
$line = <CACHE>;
***************
*** 2634,2645 ****
$short_subject =~ s/>/>/g;
! $self->{history__}{$file}{bucket} = $bucket;
! $self->{history__}{$file}{reclassified} = $reclassified;
! $self->{history__}{$file}{magnet} = $magnet;
! $self->{history__}{$file}{subject} = $subject;
! $self->{history__}{$file}{from} = $from;
! $self->{history__}{$file}{short_subject} = $short_subject;
! $self->{history__}{$file}{short_from} = $short_from;
! $self->{history__}{$file}{cull} = 0;
if ( !defined( $index ) ) {
--- 2640,2660 ----
$short_subject =~ s/>/>/g;
! # If the index is known, stick it straight into the history else# go into
! # the precache for merging into history when the history is viewed next
!
! my $cache = 'history__';
! if ( !defined( $index ) ) {
! $cache = 'history_pre_cache__';
! }
!
!
! $self->{$cache}{$file}{bucket} = $bucket;
! $self->{$cache}{$file}{reclassified} = $reclassified;
! $self->{$cache}{$file}{magnet} = $magnet;
! $self->{$cache}{$file}{subject} = $subject;
! $self->{$cache}{$file}{from} = $from;
! $self->{$cache}{$file}{short_subject} = $short_subject;
! $self->{$cache}{$file}{short_from} = $short_from;
! $self->{$cache}{$file}{cull} = 0;
if ( !defined( $index ) ) {
***************
*** 2847,2851 ****
my $fpcount = $self->{classifier__}->get_bucket_parameter( $bucket, 'fpcount' );
$self->{classifier__}->set_bucket_parameter( $bucket, 'fpcount', $fpcount+1 );
! }
# Update the class file
--- 2862,2866 ----
my $fpcount = $self->{classifier__}->get_bucket_parameter( $bucket, 'fpcount' );
$self->{classifier__}->set_bucket_parameter( $bucket, 'fpcount', $fpcount+1 );
! }
# Update the class file
***************
*** 2873,2877 ****
foreach my $newbucket (keys %work) {
$self->{classifier__}->add_messages_to_bucket( $newbucket, @{$work{$newbucket}} );
! }
}
}
--- 2888,2892 ----
foreach my $newbucket (keys %work) {
$self->{classifier__}->add_messages_to_bucket( $newbucket, @{$work{$newbucket}} );
! }
}
}
***************
*** 3091,3094 ****
--- 3106,3116 ----
}
+ # Copy the history pre-cache over AFTER any possibly index-based remove operations are complete
+ foreach my $file ( keys( %{$self->{history_pre_cache__}} ) ) {
+ $self->{history__}{$file} = $self->{history_pre_cache__}{$file};
+ delete $self->{history_pre_cache__}{$file};
+ }
+ $self->{history_pre_cache__} = {};
+
# If the history cache is invalid then we need to reload it and then if
# any of the sort, search or filter options have changed they must be
***************
*** 3207,3211 ****
$body .= "<tr";
! if ( ( ( defined($self->{form_}{file}) && ( $self->{form_}{file} eq $mail_file ) ) ) ||
( $highlight_message eq $mail_file ) ) {
$body .= " class=\"rowHighlighted\"";
--- 3229,3233 ----
$body .= "<tr";
! if ( ( ( defined($self->{form_}{file}) && ( $self->{form_}{file} eq $mail_file ) ) ) ||
( $highlight_message eq $mail_file ) ) {
$body .= " class=\"rowHighlighted\"";
***************
*** 3699,3703 ****
my ( $self, $mail_file, $archive ) = @_;
! $mail_file =~ /(popfile.+\=.+\.msg)$/;
$mail_file = $1;
$self->log_( "delete: $mail_file" );
--- 3721,3725 ----
my ( $self, $mail_file, $archive ) = @_;
! $mail_file =~ /(popfile(\d+)\=(\d+)\.msg)$/;
$mail_file = $1;
$self->log_( "delete: $mail_file" );
|