[Rt-commit] rt branch, custom-css, updated. rt-3.8.8-529-g2629406

Chia-liang Kao clkao at bestpractical.com
Tue Aug 24 13:36:20 EDT 2010


The branch, custom-css has been updated
       via  2629406a6710732ba37cd30a3aa761e329697518 (commit)
      from  7432d7070e06c523262885777d793238f49c2aa3 (commit)

Summary of changes:
 share/html/Admin/Global/Theme.html |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)

- Log -----------------------------------------------------------------
commit 2629406a6710732ba37cd30a3aa761e329697518
Author: Chia-liang Kao <clkao at bestpractical.com>
Date:   Wed Aug 25 01:38:30 2010 +0800

    check userlogo attr first.

diff --git a/share/html/Admin/Global/Theme.html b/share/html/Admin/Global/Theme.html
index 0263dc5..ed3165a 100644
--- a/share/html/Admin/Global/Theme.html
+++ b/share/html/Admin/Global/Theme.html
@@ -159,13 +159,14 @@ if (my $file_hash = _UploadedFile( 'logo-upload' )) {
     $img->read(data => $file_hash->{LargeContent} );
 }
 else {
-    my $attr = $RT::System->FirstAttribute('UserLogo');
-    my $content = $attr->Content;
-    if (ref($content) eq 'HASH') {
-        $img->read(data => $content->{data}) or die "Cannot read: ", $img->errstr;
-    }
-    else {
-        $RT::System->DeleteAttribute('UserLogo');
+    if (my $attr = $RT::System->FirstAttribute('UserLogo')) {
+        my $content = $attr->Content;
+        if (ref($content) eq 'HASH') {
+            $img->read(data => $content->{data}) or die "Cannot read: ", $img->errstr;
+        }
+        else {
+            $RT::System->DeleteAttribute('UserLogo');
+        }
     }
 }
 

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


More information about the Rt-commit mailing list