|
From: <ssc...@us...> - 2003-07-13 10:51:31
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv7140
Modified Files:
HTML.pm
Log Message:
fix for case in precaching code where POPFile exits with precached messages
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.181
retrieving revision 1.182
diff -C2 -d -r1.181 -r1.182
*** HTML.pm 13 Jul 2003 09:13:12 -0000 1.181
--- HTML.pm 13 Jul 2003 10:51:22 -0000 1.182
***************
*** 268,271 ****
--- 268,273 ----
my ( $self ) = @_;
+ $self->copy_pre_cache__();
+
$self->save_disk_cache__();
}
***************
*** 3106,3115 ****
}
! # 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
--- 3108,3112 ----
}
! $self->copy_pre_cache__();
# If the history cache is invalid then we need to reload it and then if
***************
*** 3663,3666 ****
--- 3660,3681 ----
close LANG;
}
+ }
+
+ # ---------------------------------------------------------------------------------------------
+ # copy_pre_cache__
+ #
+ # Copies the history_pre_cache into the history
+ #
+ # ---------------------------------------------------------------------------------------------
+ sub copy_pre_cache__
+ {
+ my ($self) = @_;
+
+ # 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__} = {};
}
|