[Rt-commit] rt branch, 4.0-trunk, updated. rt-3.9.7-1135-g35c9bc2

Thomas Sibley trs at bestpractical.com
Wed Dec 29 15:36:23 EST 2010


The branch, 4.0-trunk has been updated
       via  35c9bc2afbe9863ba4cffdd4829eff6aa849ffcd (commit)
      from  7fae35f16881c000390c589f84be569d5c55ceda (commit)

Summary of changes:
 share/html/Elements/Header |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

- Log -----------------------------------------------------------------
commit 35c9bc2afbe9863ba4cffdd4829eff6aa849ffcd
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Dec 29 15:18:45 2010 -0500

    Make sure we have an RT::System object before using it - #16348
    
    This ensures things like Install Mode don't break when they look for the
    UserCSS before a database exists.

diff --git a/share/html/Elements/Header b/share/html/Elements/Header
index 0a09e08..ac7f7db 100755
--- a/share/html/Elements/Header
+++ b/share/html/Elements/Header
@@ -83,7 +83,7 @@
 
 <!-- Site CSS from theme editor -->
 <style type="text/css" media="all" id="sitecss">
-% if (my $attr = RT->System->FirstAttribute('UserCSS')) {
+% if (blessed(RT->System) and my $attr = RT->System->FirstAttribute('UserCSS')) {
 <% $attr->Content |n %>
 % }
 </style>
@@ -102,6 +102,8 @@
 % }
 <div id="header"><h1><% $Title %></h1></div>
 <%INIT>
+use Scalar::Util qw(blessed);
+
 $r->headers_out->{'Pragma'} = 'no-cache';
 $r->headers_out->{'Cache-control'} = 'no-cache';
 

-----------------------------------------------------------------------


More information about the Rt-commit mailing list