[Rt-commit] rt branch, 4.2/records-history, updated. rt-3.8.8-140-g09e46bb

Thomas Sibley trs at bestpractical.com
Sat Sep 8 01:30:15 EDT 2012


The branch, 4.2/records-history has been updated
       via  09e46bb46cad8390dcee53de304f978b5fd4f230 (commit)
       via  ab5bde3c304be5f32c0efd6c44c863d5b75eacbf (commit)
      from  8d0bf1225051dedd509e0344e1d74f9f2c507874 (commit)

Summary of changes:
 lib/RT/Record.pm         |  8 ++------
 lib/RT/Ticket_Overlay.pm | 10 +++-------
 2 files changed, 5 insertions(+), 13 deletions(-)

- Log -----------------------------------------------------------------
commit ab5bde3c304be5f32c0efd6c44c863d5b75eacbf
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Sep 7 22:28:23 2012 -0700

    Fix misnamed POD header

diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index 2a16fa5..383a7d3 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -3608,7 +3608,7 @@ sub Attachments {
     return $res;
 }
 
-=head2 Attachments
+=head2 TextAttachments
 
 Customization of L<RT::Record/TextAttachments> for tickets.
 

commit 09e46bb46cad8390dcee53de304f978b5fd4f230
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Fri Sep 7 22:28:38 2012 -0700

    Filter down from all readable columns rather than hardcode a list
    
    One less array of hardcoded columns which we'll forget to update in the
    future.

diff --git a/lib/RT/Record.pm b/lib/RT/Record.pm
index 4bbbe44..dc9c1cf 100755
--- a/lib/RT/Record.pm
+++ b/lib/RT/Record.pm
@@ -1589,12 +1589,8 @@ sub Attachments {
         WithContent => 0,
         @_
     );
-    my @columns = qw(
-        id TransactionId Parent MessageId
-        Subject Filename
-        ContentType ContentEncoding
-        Creator Created
-    );
+    my @columns = grep { not /^(Headers|Content)$/ }
+                       RT::Attachment->ReadableAttributes;
     push @columns, 'Headers' if $args{'WithHeaders'};
     push @columns, 'Content' if $args{'WithContent'};
 
diff --git a/lib/RT/Ticket_Overlay.pm b/lib/RT/Ticket_Overlay.pm
index 383a7d3..40f8994 100755
--- a/lib/RT/Ticket_Overlay.pm
+++ b/lib/RT/Ticket_Overlay.pm
@@ -3578,12 +3578,8 @@ sub Attachments {
         return $res;
     }
 
-    my @columns = qw(
-        id TransactionId Parent MessageId
-        Subject Filename
-        ContentType ContentEncoding
-        Creator Created
-    );
+    my @columns = grep { not /^(Headers|Content)$/ }
+                       RT::Attachment->ReadableAttributes;
     push @columns, 'Headers' if $args{'WithHeaders'};
     push @columns, 'Content' if $args{'WithContent'};
 

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


More information about the Rt-commit mailing list