--- trunk/httpd.pl 2004/05/08 14:27:54 24 +++ trunk/httpd.pl 2004/05/08 16:06:58 25 @@ -28,6 +28,8 @@ EVAL_PERL => 1, }); +my $static_html = $mws->{config}->val('global', 'static_html'); + print "Web server ready at: ", $d->url, "\n"; @@ -73,6 +75,14 @@ # XXX LOG print $r->method," ",$url,"\n",Dumper($param),"\n" if ($debug); + # is this static page? + if ($static_html && -f "$static_html/$url") { + print "static file: $static_html/$url\n" if ($debug); + $c->send_file_response("$static_html/$url"); + $c->close; + next; + } + # template file name (use ?format=html as default) my $tpl_file = 'master.'; $tpl_file .= $param->{'format'} || 'html'; @@ -142,7 +152,7 @@ my @res = $mws->fetch_all_results(); $tpl_var->{results} = \@res if (@res); - $tpl_var->{total_hits} = $mws->{total_hits}; + $tpl_var->{total_hits} = $mws->{total_hits} || 0; }