[Rt-commit] rt branch, 4.2/userlogo-currentuser, created. rt-4.2.3-56-g9d9e524

Alex Vandiver alexmv at bestpractical.com
Thu Mar 20 20:44:00 EDT 2014


The branch, 4.2/userlogo-currentuser has been created
        at  9d9e52408930bb8e4cb55f3560fb77961e41acde (commit)

- Log -----------------------------------------------------------------
commit 9d9e52408930bb8e4cb55f3560fb77961e41acde
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Thu Mar 20 20:43:56 2014 -0400

    Set the logo attribute as the current user
    
    This assures there is a useful LastUpdatedBy in the database

diff --git a/share/html/Admin/Tools/Theme.html b/share/html/Admin/Tools/Theme.html
index c569cd1..87ea09e 100644
--- a/share/html/Admin/Tools/Theme.html
+++ b/share/html/Admin/Tools/Theme.html
@@ -243,13 +243,17 @@ my @results;
 my $imgdata;
 
 if (my $file_hash = _UploadedFile( 'logo-upload' )) {
-    my ($id, $msg) = RT->System->SetAttribute( Name => "UserLogo",
-                                                Description => "User-provided logo",
-                                                Content => {
-                                                    type => $file_hash->{ContentType},
-                                                    data => $file_hash->{LargeContent},
-                                                    hash => md5_hex($file_hash->{LargeContent}),
-                                                } );
+    my $my_system = RT::System->new( $session{CurrentUser} );
+    my ( $id, $msg ) = $my_system->SetAttribute(
+        Name        => "UserLogo",
+        Description => "User-provided logo",
+        Content     => {
+            type => $file_hash->{ContentType},
+            data => $file_hash->{LargeContent},
+            hash => md5_hex($file_hash->{LargeContent}),
+        },
+    );
+
     push @results, loc("Unable to set UserLogo: [_1]", $msg) unless $id;
 
     $imgdata = $file_hash->{LargeContent};

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


More information about the rt-commit mailing list