[Bps-public-commit] rt-extension-spamfilter branch, master, updated. 4b4e22e2d220446e379227224e56107339971fdb

? sunnavy sunnavy at bestpractical.com
Tue Nov 3 09:04:25 EST 2015


The branch, master has been updated
       via  4b4e22e2d220446e379227224e56107339971fdb (commit)
       via  536e0e5aab3b35b5c8e8d6749699b90192366eb8 (commit)
      from  542f920ff9f11a2f803aaea0d8750c3a38184ed0 (commit)

Summary of changes:
 Makefile.PL                          | 6 ++++--
 lib/RT/Interface/Email/SpamFilter.pm | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit 536e0e5aab3b35b5c8e8d6749699b90192366eb8
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Nov 3 21:46:33 2015 +0800

    need to return undef to continue calling next plugin's GetCurrentUser
    
    SUCCESS could shortcircuit all the plugins

diff --git a/lib/RT/Interface/Email/SpamFilter.pm b/lib/RT/Interface/Email/SpamFilter.pm
index 4f5b3cc..91d9e0b 100644
--- a/lib/RT/Interface/Email/SpamFilter.pm
+++ b/lib/RT/Interface/Email/SpamFilter.pm
@@ -96,9 +96,9 @@ sub GetCurrentUser {
         if ( !$ret ) {
             RT->Logger->error( "Failed to create Spam record: $message" );
         }
+        FAILURE("Spammed");
     }
-
-    SUCCESS();
+    return undef; # pass to the next plugin
 }
 
 1;

commit 4b4e22e2d220446e379227224e56107339971fdb
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Tue Nov 3 22:03:43 2015 +0800

    bump rt_too_new for 4.6.0 instead
    
    it works for 4.4

diff --git a/Makefile.PL b/Makefile.PL
index 0e15c80..65ab836 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,10 +4,12 @@ RTx     'RT-Extension-SpamFilter';
 license 'gplv2';
 repository 'https://github.com/bestpractical/rt-extension-spamfilter';
 
-requires_rt_plugin 'RT::Extension::FutureMailgate';
+if ( $RT::VERSION =~ /^4\.2/ ) {
+    requires_rt_plugin 'RT::Extension::FutureMailgate';
+}
 
 requires_rt '4.0.0';
-rt_too_new '4.4.0';
+rt_too_new '4.6.0';
 
 sign;
 WriteAll;

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


More information about the Bps-public-commit mailing list