[Rt-commit] r7697 - in rtir/branches/2.3-EXPERIMENTAL: . html/RTIR/Elements

jesse at bestpractical.com jesse at bestpractical.com
Wed Apr 25 12:52:34 EDT 2007


Author: jesse
Date: Wed Apr 25 12:52:32 2007
New Revision: 7697

Added:
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/images/
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/images/autohandler
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/images/logo.png   (contents, props changed)
Modified:
   rtir/branches/2.3-EXPERIMENTAL/   (props changed)
   rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/Header

Log:
 r56073 at pinglin:  jesse | 2007-04-25 12:45:11 -0400
 * Add new logo, contributed by Carlos Fuentes at Rediris


Modified: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/Header
==============================================================================
--- rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/Header	(original)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/Elements/Header	Wed Apr 25 12:52:32 2007
@@ -24,5 +24,7 @@
 <& /Elements/Header,
     URL  => RT->Config->Get('WebPath') ."/RTIR/index.html",
     Name => loc("RTIR for [_1]", RT->Config->Get('rtirname')),
+    LogoURL => RT->Config->Get('WebPath')."/RTIR/NoAuth/images/logo.png",
     %ARGS
+
 &>

Added: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/images/autohandler
==============================================================================
--- (empty file)
+++ rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/images/autohandler	Wed Apr 25 12:52:32 2007
@@ -0,0 +1,27 @@
+<%INIT>
+
+# This autohandler will spit out RT's images if the user hasn't 
+# properly configured their webserver to stop RT from passing 
+# images through the mason handler.
+
+my $file = $m->base_comp->source_file;
+
+my $type = "application/octet-stream";
+if ($file =~ /\.(gif|png|jpe?g)$/i) {
+    $type = "image/$1";
+    $type =~ s/jpg/jpeg/gi;
+}
+
+die "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;
+</%INIT>

Added: rtir/branches/2.3-EXPERIMENTAL/html/RTIR/NoAuth/images/logo.png
==============================================================================
Binary file. No diff available.


More information about the Rt-commit mailing list