[Rt-commit] r17992 - in rt/3.999/branches/merge_to_3.8.2: .

sunnavy at bestpractical.com sunnavy at bestpractical.com
Thu Jan 29 03:19:49 EST 2009


Author: sunnavy
Date: Thu Jan 29 03:19:48 2009
New Revision: 17992

Modified:
   rt/3.999/branches/merge_to_3.8.2/   (props changed)
   rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/css/autohandler

Log:
 r19177 at sunnavys-mb:  sunnavy | 2009-01-29 15:01:38 +0800
 merged share/html/NoAuth/css/autohandler


Modified: rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/css/autohandler
==============================================================================
--- rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/css/autohandler	(original)
+++ rt/3.999/branches/merge_to_3.8.2/share/html/NoAuth/css/autohandler	Thu Jan 29 03:19:48 2009
@@ -46,32 +46,14 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <%init>
-RT::Interface::Web::static_file_headers();
-my $type;
 my $file = $m->base_comp->source_file;
 
 if ($file =~ /\.(gif|png|jpe?g)$/i) {
-    $type = "image/$1";
-    $type =~ s/jpg/jpeg/gi;
-
-
-die "file $file not found" unless -f $file && -r _;
-
-$r->content_type($type);
-open my $fh, "<$file" or die "couldn't open file: $!";
-binmode($fh);
-{
-    local $/ = \16384;
-    $m->out($_) while (<$fh>);
-    $m->flush_buffer;
-}
-close $fh;
-$m->abort;
+    RT::Interface::Web->send_static_file( file => $file );
 } else {
-
-$r->content_type('text/css') ;
-$m->call_next();
-return();
+    RT::Interface::Web::static_file_headers();
+    $r->content_type('text/css') ;
+    $m->call_next();
+    return();
 }
-
 </%init>


More information about the Rt-commit mailing list