[Rt-commit] rt branch, 4.0/add-articles-callbacks, created. rt-4.0.2-186-g62ca47c
Thomas Sibley
trs at bestpractical.com
Tue Oct 11 14:30:44 EDT 2011
The branch, 4.0/add-articles-callbacks has been created
at 62ca47c19850642e235ce401856c1c61bd2d6992 (commit)
- Log -----------------------------------------------------------------
commit 62ca47c19850642e235ce401856c1c61bd2d6992
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Oct 11 11:30:21 2011 -0400
Add a default callback for IncludeArticle
This is very useful if you want to do something extra when an article is
included or massage the end result of Preformatted. The only option
before this was to hook the ProcessContent callback of the Preformatted
component, but that callback gets run many times for each article.
diff --git a/share/html/Articles/Elements/IncludeArticle b/share/html/Articles/Elements/IncludeArticle
index 9658e08..d651afe 100644
--- a/share/html/Articles/Elements/IncludeArticle
+++ b/share/html/Articles/Elements/IncludeArticle
@@ -84,6 +84,8 @@ foreach my $arg ( keys %$parent_args ) {
Article => $article, Ticket => $Ticket
);
+ $m->callback( Article => $article, Ticket => $Ticket, formatted_article => \$formatted_article );
+
if (RT->Config->Get('MessageBoxRichText', $session{'CurrentUser'})) {
$formatted_article =~ s/>/>/g;
$formatted_article =~ s/</</g;
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list