[Rt-commit] [svn] r1930 - in rt/branches/3.3-TESTING: . html/Ticket/Elements

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Mon Nov 22 14:43:54 EST 2004


Author: jesse
Date: Mon Nov 22 14:43:53 2004
New Revision: 1930

Modified:
   rt/branches/3.3-TESTING/   (props changed)
   rt/branches/3.3-TESTING/html/Ticket/Elements/ShowAttachments
Log:
 r9332 at tinbook:  jesse | 2004-11-22T19:44:46.719948Z
  r9320 at tinbook:  jesse | 2004-11-22T18:13:24.717525Z
  RT-Ticket: 6264
  RT-Status: resolved
  RT-Update: correspond
  
  Fix the "ShowAttachments" component to deal gracefully, even if called without a 
  precached set of attachments.  From Rolf Grossmann.
  
  
 


Modified: rt/branches/3.3-TESTING/html/Ticket/Elements/ShowAttachments
==============================================================================
--- rt/branches/3.3-TESTING/html/Ticket/Elements/ShowAttachments	(original)
+++ rt/branches/3.3-TESTING/html/Ticket/Elements/ShowAttachments	Mon Nov 22 14:43:53 2004
@@ -82,8 +82,12 @@
 % }
 
 <%INIT>
-my %documents;
 
+# If we haven't been passed in an Attachments object (through the precaching mechanism)
+# then we need to find one
+$Attachments ||= $m->comp('FindAttachments', Ticket => $Ticket);
+
+my %documents;
 while ( my $attach = $Attachments->Next() ) {
     next unless ($attach->Filename());
    unshift( @{ $documents{ $attach->Filename } }, $attach );


More information about the Rt-commit mailing list