|
From: <jgr...@us...> - 2003-08-23 00:48:32
|
Update of /cvsroot/popfile/engine/UI
In directory sc8-pr-cvs1:/tmp/cvs-serv17526/UI
Modified Files:
HTML.pm
Log Message:
Tests for the individual bucket page viewing word frequencies and emptying the bucket; TestHTML now covers 74% of the HTML.pm code; just the History page to test
Index: HTML.pm
===================================================================
RCS file: /cvsroot/popfile/engine/UI/HTML.pm,v
retrieving revision 1.195
retrieving revision 1.196
diff -C2 -d -r1.195 -r1.196
*** HTML.pm 22 Aug 2003 14:31:08 -0000 1.195
--- HTML.pm 23 Aug 2003 00:48:24 -0000 1.196
***************
*** 580,585 ****
# Build the full page of HTML by preprending the standard header and append the standard
# footer
! $text = html_common_top($self, $selected) . html_common_middle($self, $text, $update_check, @tab)
! . html_common_bottom($self);
# Build an HTTP header for standard HTML
--- 580,585 ----
# Build the full page of HTML by preprending the standard header and append the standard
# footer
! $text = html_common_top($self, $selected) . html_common_middle($self, $text, $update_check, @tab) # PROFILE BLOCK START
! . html_common_bottom($self); # PROFILE BLOCK STOP
# Build an HTTP header for standard HTML
***************
*** 1726,1730 ****
if ( $self->{classifier__}->get_bucket_word_count( $self->{form_}{showbucket} ) > 0 ) {
! for my $i (@{$self->{classifier__}->get_bucket_word_list($self->{form_}{showbucket})}) {
if ( defined($i) ) {
my $j = $i;
--- 1726,1730 ----
if ( $self->{classifier__}->get_bucket_word_count( $self->{form_}{showbucket} ) > 0 ) {
! for my $i ($self->{classifier__}->get_bucket_word_list($self->{form_}{showbucket})) {
if ( defined($i) ) {
my $j = $i;
***************
*** 1783,1789 ****
my @xaxis = sort keys %values;
! if ( $#xaxis < 0 ) {
! return '';
! }
my @series = sort keys %{$values{$xaxis[0]}};
--- 1783,1787 ----
my @xaxis = sort keys %values;
! return '' if ( $#xaxis < 0 );
my @series = sort keys %{$values{$xaxis[0]}};
***************
*** 2295,2315 ****
my $bm;
! if ( $a =~ /popfile(\d+)=(\d+)\.msg/ ) {
! $ad = $1;
! $am = $2;
! if ( $b =~ /popfile(\d+)=(\d+)\.msg/ ) {
! $bd = $1;
! $bm = $2;
! if ( $ad == $bd ) {
! return ( $bm <=> $am );
! } else {
! return ( $bd <=> $ad );
! }
! }
}
-
- return 0;
}
--- 2293,2309 ----
my $bm;
! $a =~ /popfile(\d+)=(\d+)\.msg/;
! $ad = $1;
! $am = $2;
! $b =~ /popfile(\d+)=(\d+)\.msg/;
! $bd = $1;
! $bm = $2;
! if ( $ad == $bd ) {
! return ( $bm <=> $am );
! } else {
! return ( $bd <=> $ad );
}
}
***************
*** 3150,3157 ****
# Redirect somewhere safe if non-idempotent action has been taken
! if ( defined( $self->{form_}{deletemessage} ) ||
defined( $self->{form_}{clearpage} ) ||
defined( $self->{form_}{undo} ) ||
! defined( $self->{form_}{reclassify} ) ) {
return $self->http_redirect_( $client, "/history?" . $self->print_form_fields_(1,0,('start_message','filter','search','sort','session') ) );
}
--- 3144,3151 ----
# Redirect somewhere safe if non-idempotent action has been taken
! if ( defined( $self->{form_}{deletemessage} ) || # PROFILE BLOCK START
defined( $self->{form_}{clearpage} ) ||
defined( $self->{form_}{undo} ) ||
! defined( $self->{form_}{reclassify} ) ) { # PROFILE BLOCK STOP
return $self->http_redirect_( $client, "/history?" . $self->print_form_fields_(1,0,('start_message','filter','search','sort','session') ) );
}
***************
*** 3249,3254 ****
$body .= "<tr";
! if ( ( ( defined($self->{form_}{file}) && ( $self->{form_}{file} eq $mail_file ) ) ) ||
! ( $highlight_message eq $mail_file ) ) {
$body .= " class=\"rowHighlighted\"";
} else {
--- 3243,3248 ----
$body .= "<tr";
! if ( ( ( defined($self->{form_}{file}) && ( $self->{form_}{file} eq $mail_file ) ) ) || # PROFILE BLOCK START
! ( $highlight_message eq $mail_file ) ) { # PROFILE BLOCK STOP
$body .= " class=\"rowHighlighted\"";
} else {
|