[Bps-public-commit] rt-extension-articletemplates branch, master, updated. 0957a2ca52d8602e59f7b8323281dcbd37b87b53

Thomas Sibley trs at bestpractical.com
Wed Sep 7 11:48:15 EDT 2011


The branch, master has been updated
       via  0957a2ca52d8602e59f7b8323281dcbd37b87b53 (commit)
      from  090f63f849037ea1930d515d62546235b884fd15 (commit)

Summary of changes:
 .../SubjectOverride}/ProcessContent                |    0
 .../SubjectOverride}/ProcessContent                |    0
 2 files changed, 0 insertions(+), 0 deletions(-)
 copy html/Callbacks/RT-Extension-ArticleTemplates/Articles/{Article/Elements/Preformatted => Elements/SubjectOverride}/ProcessContent (100%)
 copy html/Callbacks/RT-Extension-ArticleTemplates/{Articles/Article/Elements/Preformatted => Elements/SubjectOverride}/ProcessContent (100%)

- Log -----------------------------------------------------------------
commit 0957a2ca52d8602e59f7b8323281dcbd37b87b53
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Wed Sep 7 11:47:12 2011 -0400

    Add callbacks to process subject overrides
    
    This hooks both the 4.2 core feature and the backported 4.0 extension.

diff --git a/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Elements/SubjectOverride/ProcessContent b/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Elements/SubjectOverride/ProcessContent
new file mode 100644
index 0000000..bb10e75
--- /dev/null
+++ b/html/Callbacks/RT-Extension-ArticleTemplates/Articles/Elements/SubjectOverride/ProcessContent
@@ -0,0 +1,30 @@
+%# BEGIN LICENSE BLOCK
+%# 
+%#  Copyright (c) 2002-2003 Jesse Vincent <jesse at bestpractical.com>
+%#  
+%#  This program is free software; you can redistribute it and/or modify
+%#  it under the terms of version 2 of the GNU General Public License 
+%#  as published by the Free Software Foundation.
+%# 
+%#  A copy of that license should have arrived with this
+%#  software, but in any event can be snarfed from www.gnu.org.
+%# 
+%#  This program is distributed in the hope that it will be useful,
+%#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+%#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%#  GNU General Public License for more details.
+%# 
+%# END LICENSE BLOCK
+<%init>
+my ($new, $msg) = $Article->ParseTemplate( $$content, Ticket => $Ticket );
+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>
diff --git a/html/Callbacks/RT-Extension-ArticleTemplates/Elements/SubjectOverride/ProcessContent b/html/Callbacks/RT-Extension-ArticleTemplates/Elements/SubjectOverride/ProcessContent
new file mode 100644
index 0000000..bb10e75
--- /dev/null
+++ b/html/Callbacks/RT-Extension-ArticleTemplates/Elements/SubjectOverride/ProcessContent
@@ -0,0 +1,30 @@
+%# BEGIN LICENSE BLOCK
+%# 
+%#  Copyright (c) 2002-2003 Jesse Vincent <jesse at bestpractical.com>
+%#  
+%#  This program is free software; you can redistribute it and/or modify
+%#  it under the terms of version 2 of the GNU General Public License 
+%#  as published by the Free Software Foundation.
+%# 
+%#  A copy of that license should have arrived with this
+%#  software, but in any event can be snarfed from www.gnu.org.
+%# 
+%#  This program is distributed in the hope that it will be useful,
+%#  but WITHOUT ANY WARRANTY; without even the implied warranty of
+%#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+%#  GNU General Public License for more details.
+%# 
+%# END LICENSE BLOCK
+<%init>
+my ($new, $msg) = $Article->ParseTemplate( $$content, Ticket => $Ticket );
+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