[Bps-public-commit] RT-Extension-CommandByMail branch, master, updated. 0.13
Thomas Sibley
trs at bestpractical.com
Tue Jul 23 19:39:12 EDT 2013
The branch, master has been updated
via c506c8efcb86754c21e92be22ee5912ab0ce58e8 (commit)
via 00ebcb12e4e5f7be87f416122031712ba94fb464 (commit)
via d75afe3789ed1d8b5d3302ed0530554052d97be3 (commit)
from 81d9f27739831850dadac3df9bf3386f2d117f1e (commit)
Summary of changes:
Changes | 3 +++
INSTALL | 5 +++++
META.yml | 2 +-
lib/RT/Extension/CommandByMail.pm | 2 +-
lib/RT/Interface/Email/Filter/TakeAction.pm | 14 +++++++++-----
5 files changed, 19 insertions(+), 7 deletions(-)
- Log -----------------------------------------------------------------
commit d75afe3789ed1d8b5d3302ed0530554052d97be3
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Jul 23 16:36:09 2013 -0700
Replace hard tabs that snuck in with ea04c37
diff --git a/lib/RT/Interface/Email/Filter/TakeAction.pm b/lib/RT/Interface/Email/Filter/TakeAction.pm
index d099556..a6b0466 100644
--- a/lib/RT/Interface/Email/Filter/TakeAction.pm
+++ b/lib/RT/Interface/Email/Filter/TakeAction.pm
@@ -197,8 +197,8 @@ sub GetCurrentUser {
$RT::Logger->debug("Running CommandByMail as ".$args{'CurrentUser'}->UserObj->Name);
my $headername = $new_config
- ? RT->Config->Get('CommandByMailHeader')
- : $RT::CommandByMailHeader;
+ ? RT->Config->Get('CommandByMailHeader')
+ : $RT::CommandByMailHeader;
# find the content
my @content;
@@ -214,7 +214,7 @@ sub GetCurrentUser {
}
if (defined $headername) {
- unshift @content, $args{'Message'}->head->get_all($headername);
+ unshift @content, $args{'Message'}->head->get_all($headername);
}
my @items;
commit 00ebcb12e4e5f7be87f416122031712ba94fb464
Author: Tollef Fog Heen <tfheen at err.no>
Date: Mon Jul 22 20:56:05 2013 +0200
Add support for only inspecting headers, not the body
Default is to still look in body, but if you want the module to only
look in the defined header, use Set($CommandByMailOnlyHeaders, 1);
(Based on commit 2b533dc27f6a074b96a39c66379fc150a3f51ede from pr/3.)
[Adjusted tabs â s/\t/ /g â and simplified the $only_headers
conditional. -trs]
diff --git a/INSTALL b/INSTALL
index d8fdaeb..0815ad9 100644
--- a/INSTALL
+++ b/INSTALL
@@ -57,5 +57,10 @@ CommandByMailHeader like:
Set($CommandByMailHeader, "X-RT-Command");
+If you only want it to look in headers and not the body, you can set
+CommandByMailOnlyHeaders to a true value, like:
+
+ Set($CommandByMailOnlyHeaders, 1);
+
Enjoy.
diff --git a/lib/RT/Interface/Email/Filter/TakeAction.pm b/lib/RT/Interface/Email/Filter/TakeAction.pm
index a6b0466..cf7843a 100644
--- a/lib/RT/Interface/Email/Filter/TakeAction.pm
+++ b/lib/RT/Interface/Email/Filter/TakeAction.pm
@@ -200,9 +200,13 @@ sub GetCurrentUser {
? RT->Config->Get('CommandByMailHeader')
: $RT::CommandByMailHeader;
+ my $only_headers = $new_config
+ ? RT->Config->Get('CommandByMailOnlyHeaders')
+ : $RT::CommandByMailOnlyHeaders;
+
# find the content
- my @content;
- my @parts = $args{'Message'}->parts_DFS;
+ my @content = ();
+ my @parts = $only_headers ? () : $args{'Message'}->parts_DFS;
foreach my $part (@parts) {
my $body = $part->bodyhandle or next;
commit c506c8efcb86754c21e92be22ee5912ab0ce58e8
Author: Thomas Sibley <trs at bestpractical.com>
Date: Tue Jul 23 16:38:30 2013 -0700
Releng 0.13
diff --git a/Changes b/Changes
index 7462f91..8728393 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
Revision history for RT-Extension-CommandByMail
+0.13 Tue Jul 23 16:37:05 PDT 2013
+* Add support for only inspecting headers, not the body
+
0.12 Mon Jul 22 11:07:44 PDT 2013
* Handle setting TxnCFs to 0 (zero)
* Regression fix for parsing bug in 0.11
diff --git a/META.yml b/META.yml
index 49794c2..0184c4a 100644
--- a/META.yml
+++ b/META.yml
@@ -27,4 +27,4 @@ requires:
perl: 5.8.3
resources:
license: http://dev.perl.org/licenses/
-version: 0.12
+version: 0.13
diff --git a/lib/RT/Extension/CommandByMail.pm b/lib/RT/Extension/CommandByMail.pm
index 27bbfae..731b73a 100644
--- a/lib/RT/Extension/CommandByMail.pm
+++ b/lib/RT/Extension/CommandByMail.pm
@@ -1,7 +1,7 @@
use 5.008003;
package RT::Extension::CommandByMail;
-our $VERSION = '0.12';
+our $VERSION = '0.13';
1;
__END__
-----------------------------------------------------------------------
More information about the Bps-public-commit
mailing list