[Bps-public-commit] rt-extension-articletemplates branch, request-args, updated. 0.04-3-g9ef8a63
Thomas Sibley
trs at bestpractical.com
Wed Dec 7 09:41:33 EST 2011
The branch, request-args has been updated
via 9ef8a63246ef7d557cdb4105995b1d1c7e080196 (commit)
from 4ae8949779918d86e26abba30eb12c8586a12508 (commit)
Summary of changes:
.../Article/Elements/Preformatted/ProcessContent | 14 +-------------
.../Elements/SubjectOverride/ProcessContent | 14 +-------------
.../Elements/SubjectOverride/ProcessContent | 14 +-------------
.../RT-Extension-ArticleTemplates/ProcessContent | 13 +++++++++++++
4 files changed, 16 insertions(+), 39 deletions(-)
create mode 100644 html/Elements/RT-Extension-ArticleTemplates/ProcessContent
- Log -----------------------------------------------------------------
commit 9ef8a63246ef7d557cdb4105995b1d1c7e080196
Author: Thomas Sibley <trs at bestpractical.com>
Date: Wed Dec 7 09:35:26 2011 -0500
Refactor the triplicated ProcessContent callbacks into one component
diff --git a/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Article/Elements/Preformatted/ProcessContent b/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Article/Elements/Preformatted/ProcessContent
index ba06c77..d960f13 100644
--- a/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Article/Elements/Preformatted/ProcessContent
+++ b/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Article/Elements/Preformatted/ProcessContent
@@ -15,16 +15,4 @@
%# GNU General Public License for more details.
%#
%# END LICENSE BLOCK
-<%init>
-my ($new, $msg) = $Article->ParseTemplate( $$content, Ticket => $Ticket, request_args => { $m->request_args } );
-unless ( defined $new && length $new ) {
- $RT::Logger->error("Couldn't parse article's content: $msg");
-} else {
- $$content = $new;
-}
-</%init>
-<%args>
-$Article
-$Ticket => undef
-$content
-</%args>
+<& /Elements/RT-Extension-ArticleTemplates/ProcessContent, %ARGS &>
diff --git a/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Elements/SubjectOverride/ProcessContent b/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Elements/SubjectOverride/ProcessContent
index ba06c77..d960f13 100644
--- a/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Elements/SubjectOverride/ProcessContent
+++ b/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Elements/SubjectOverride/ProcessContent
@@ -15,16 +15,4 @@
%# GNU General Public License for more details.
%#
%# END LICENSE BLOCK
-<%init>
-my ($new, $msg) = $Article->ParseTemplate( $$content, Ticket => $Ticket, request_args => { $m->request_args } );
-unless ( defined $new && length $new ) {
- $RT::Logger->error("Couldn't parse article's content: $msg");
-} else {
- $$content = $new;
-}
-</%init>
-<%args>
-$Article
-$Ticket => undef
-$content
-</%args>
+<& /Elements/RT-Extension-ArticleTemplates/ProcessContent, %ARGS &>
diff --git a/html/Callbacks/RT-Extension-ArticleTemplates/Elements/SubjectOverride/ProcessContent b/html/Callbacks/RT-Extension-ArticleTemplates/Elements/SubjectOverride/ProcessContent
index ba06c77..d960f13 100644
--- a/html/Callbacks/RT-Extension-ArticleTemplates/Elements/SubjectOverride/ProcessContent
+++ b/html/Callbacks/RT-Extension-ArticleTemplates/Elements/SubjectOverride/ProcessContent
@@ -15,16 +15,4 @@
%# GNU General Public License for more details.
%#
%# END LICENSE BLOCK
-<%init>
-my ($new, $msg) = $Article->ParseTemplate( $$content, Ticket => $Ticket, request_args => { $m->request_args } );
-unless ( defined $new && length $new ) {
- $RT::Logger->error("Couldn't parse article's content: $msg");
-} else {
- $$content = $new;
-}
-</%init>
-<%args>
-$Article
-$Ticket => undef
-$content
-</%args>
+<& /Elements/RT-Extension-ArticleTemplates/ProcessContent, %ARGS &>
diff --git a/html/Elements/RT-Extension-ArticleTemplates/ProcessContent b/html/Elements/RT-Extension-ArticleTemplates/ProcessContent
new file mode 100644
index 0000000..98d469a
--- /dev/null
+++ b/html/Elements/RT-Extension-ArticleTemplates/ProcessContent
@@ -0,0 +1,13 @@
+<%init>
+my ($new, $msg) = $Article->ParseTemplate( $$content, Ticket => $Ticket, request_args => { $m->request_args } );
+unless ( defined $new && length $new ) {
+ $RT::Logger->error("Couldn't parse article's content: $msg");
+} else {
+ $$content = $new;
+}
+</%init>
+<%args>
+$Article
+$Ticket => undef
+$content
+</%args>
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list