/[mws]/trunk/httpd.pl
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 /trunk/httpd.pl

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

revision 18 by dpavlin, Fri May 7 11:25:01 2004 UTC revision 19 by dpavlin, Fri May 7 20:52:34 2004 UTC
# Line 107  while ( my $c = $d->accept ) { Line 107  while ( my $c = $d->accept ) {
107                  #                  #
108                  # ?show_id=XXXXxxxx___message_id___xxxxXXXX                  # ?show_id=XXXXxxxx___message_id___xxxxXXXX
109                  } elsif ($param->{'show_id'}) {                  } elsif ($param->{'show_id'}) {
110                            
111                            $mws->reset_counters;
112                          my $row = $mws->fetch_result_by_id($param->{'show_id'});                          my $row = $mws->fetch_result_by_id($param->{'show_id'});
113                          $tpl_var->{message} = $row;                          $tpl_var->{message} = $row;
114                  }                  }
115    
116    print Dumper($mws->{counter});
117    
118                    # push counters to template
119                    foreach my $f (qw(from to cc bcc)) {
120                            my $h = $mws->counter($f) || next;
121                            my @a;
122                            foreach my $k (sort { $h->{$b}->{usage} <=> $h->{$a}->{usage} } keys %$h) {
123                                    push @a, $h->{$k};
124                            }
125                            $tpl_var->{counters}->{$f} = [ @a ] if (@a);
126                    }
127    
128                  $tt->process($tpl_file, $tpl_var, \$html) || die $tt->error();                  $tt->process($tpl_file, $tpl_var, \$html) || die $tt->error();
129    
130                  #                  #
# Line 154  sub subject_search_filter { Line 167  sub subject_search_filter {
167          while ( $s =~ s/^\s*\[(?:re|fwd|fw):\s+(.+)\]\s*$/$1/ig ||          while ( $s =~ s/^\s*\[(?:re|fwd|fw):\s+(.+)\]\s*$/$1/ig ||
168                  $s =~ s/^\s*(?:re|fwd|fw):\s+(.+?)\s*$/$1/ig ||                  $s =~ s/^\s*(?:re|fwd|fw):\s+(.+?)\s*$/$1/ig ||
169                  $s =~ s/^\[\S+\]\s*//ig ||                  $s =~ s/^\[\S+\]\s*//ig ||
170                  $s =~ s/^\[[^@]+@\w+\.\w+\s*:\s+(.+)\s*\]\s*$/$1/g                  $s =~ s/^\[[^@]+@\w+\.\w+\s*:\s+(.+)\s*\]\s*$/$1/g ||
171                    $s =~ s/\(fwd\)\s*$//ig ||
172                    $s =~ s/\"//g
173          ) { };          ) { };
174          return $s;          return $s;
175  }  }

Legend:
Removed from v.18  
changed lines
  Added in v.19

  ViewVC Help
Powered by ViewVC 1.1.26