[Rt-commit] [rtir] 04/05: Remove wrap and monkey patch to call CleanupRequest

Jim Brandt jbrandt at bestpractical.com
Fri Mar 21 17:18:35 EDT 2014


This is an automated email from the git hooks/post-receive script.

jbrandt pushed a commit to branch 3.2/remove-lexwrap
in repository rtir.

commit 6fcb906d0b21906884e70685ab361657802103bb
Author: Jim Brandt <jbrandt at bestpractical.com>
Date:   Fri Mar 21 16:48:35 2014 -0400

    Remove wrap and monkey patch to call CleanupRequest
---
 lib/RT/IR.pm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 49ff4c1..e23d2f4 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -617,10 +617,12 @@ if ( RT::IR->HasConstituency ) {
     # ACL checks for multiple constituencies
 
     require RT::Interface::Web::Handler;
-    # flush constituency cache on each request
-    wrap 'RT::Interface::Web::Handler::CleanupRequest', pre => sub {
+    no warnings 'redefine';
+    my $orig_Cleanup = \&RT::Interface::Web::Handler::CleanupRequest;
+    *RT::Interface::Web::Handler::CleanupRequest = sub {
         %RT::IR::ConstituencyCache = ();
         %RT::IR::HasNoQueueCache = ();
+        &{$orig_Cleanup};
     };
 
     require RT::Ticket;

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the rt-commit mailing list