[Rt-commit] rt branch, 4.2/tickethistory-callback, created. rt-4.2.6-36-gec0bb0d

Kevin Falcone falcone at bestpractical.com
Wed Aug 13 16:06:47 EDT 2014


The branch, 4.2/tickethistory-callback has been created
        at  ec0bb0d9edaf35c321041150ecc66f63841e8141 (commit)

- Log -----------------------------------------------------------------
commit ec0bb0d9edaf35c321041150ecc66f63841e8141
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Aug 13 15:48:57 2014 -0400

    Allow extra arguments to be passed to ShowHistory
    
    RTIR wants to customize a number of paths during history display (see
    RTIR/Display.html and RTIR/Incident/Display.html).  In order to use
    delayed history loading, RTIR either needs to pass those as GET
    arguments (allowing user injection of paths that we use to build links,
    which is dangerous without sanitation) or otherwise get them to
    ShowHistory.
    
    With this, RTIR can just callback in the custom arguments (you can also
    clobber any of the other arguments to ShowHistory with it).

diff --git a/share/html/Helpers/TicketHistory b/share/html/Helpers/TicketHistory
index 88b8ea3..0ca39e6 100644
--- a/share/html/Helpers/TicketHistory
+++ b/share/html/Helpers/TicketHistory
@@ -54,12 +54,15 @@ $TicketObj->Load($id);
 
 my $attachments = $TicketObj->Attachments;
 my $attachment_content = $TicketObj->TextAttachments;
+my %extra_args;
+$m->callback( CallbackName => 'ExtraShowHistoryArguments', Ticket => $TicketObj, ExtraArgs => \%extra_args );
 </%INIT>
 <& /Elements/ShowHistory,
     Object => $TicketObj,
     ShowHeaders => $ARGS{'ShowHeaders'},
     Attachments => $attachments,
-    AttachmentContent => $attachment_content
+    AttachmentContent => $attachment_content,
+    %extra_args,
     &>
 <script type="text/javascript">ReplaceUserReferences()</script>
 % $m->abort();

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


More information about the rt-commit mailing list