/[webpac]/trunk2/lib/WebPAC.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk2/lib/WebPAC.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 448 by dpavlin, Wed Sep 15 16:53:51 2004 UTC revision 459 by dpavlin, Tue Sep 21 19:08:11 2004 UTC
# Line 352  sub progress_bar { Line 352  sub progress_bar {
352    
353          $self->{'last_pcnt'} ||= 1;          $self->{'last_pcnt'} ||= 1;
354    
355          my $p = int($curr * 100 / $max);          my $p = int($curr * 100 / $max) || 1;
356    
357          # reset on re-run          # reset on re-run
358          if ($p < $self->{'last_pcnt'}) {          if ($p < $self->{'last_pcnt'}) {
359                  $self->{'last_pcnt'} = $p;                  $self->{'last_pcnt'} = $p;
360                  $self->{'last_t'} = time();                  $self->{'last_t'} = time();
361                  $self->{'last_curr'} = 1;                  $self->{'last_curr'} = undef;
362          }          }
363    
364            $self->{'last_t'} ||= time();
365    
366          if ($p != $self->{'last_pcnt'}) {          if ($p != $self->{'last_pcnt'}) {
367    
368                  my $last_curr = $self->{'last_curr'} || $curr;                  my $last_curr = $self->{'last_curr'} || $curr;

Legend:
Removed from v.448  
changed lines
  Added in v.459

  ViewVC Help
Powered by ViewVC 1.1.26