/[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 7 by dpavlin, Wed May 5 15:38:35 2004 UTC revision 12 by dpavlin, Thu May 6 12:40:11 2004 UTC
# Line 78  while ( my $c = $d->accept ) { Line 78  while ( my $c = $d->accept ) {
78                  #                  #
79                  my $html;                  my $html;
80    
81                    if ($param->{'search_val'} && $param->{'search_fld'} && !$param->{'search'}) {
82                            $param->{'search'} = $param->{'search_fld'}.":".$param->{'search_val'};
83                    }
84    
85                  # show search results                  # show search results
86                  # ?search=foo:bar                  # ?search=foo:bar
87                  if ($param->{'search'}) {                  if ($param->{'search'}) {
# Line 119  while ( my $c = $d->accept ) { Line 123  while ( my $c = $d->accept ) {
123    
124  # template toolkit filter  # template toolkit filter
125    
126    #use Text::Context::EitherSide;
127    
128  sub body5_filter {  sub body5_filter {
129          my $text = shift;          my $text = shift;
130          $text =~ s/^\s+//gs;          $text =~ s/^\s+//gs;
131          $text =~ s/[\n\r]+[\>:\|=]+\s*.*?[\n\r]+//sg;   # remove quoted text          $text =~ s/^[\>:\|=]+\s*.*?$//msg;      # remove quoted text
132            $text =~ s/[\n\r]+/\n/gs;               # compress cr/lf
133          $text =~ s,^((?:.*?[\n\r]){5}).*$,$1<span style="color:#808080">--8&lt;--[cut]--8&lt;--</span>,s;          $text =~ s,^((?:.*?[\n\r]){5}).*$,$1<span style="color:#808080">--8&lt;--[cut]--8&lt;--</span>,s;
134          $text =~ s/[\n\r]+--\s*[\n\r]+.*$//s;          $text =~ s/[\n\r]+--\s*[\n\r]+.*$//s;
135    
136    #       my $context = Text::Context::EitherSide->new($text, context => 5);
137    #       return $context->as_string("perl");
138    
139          return $text;          return $text;
140  }  }
141    

Legend:
Removed from v.7  
changed lines
  Added in v.12

  ViewVC Help
Powered by ViewVC 1.1.26