[Rt-commit] [rtir] 08/14: Promote _FlushCustomFieldsCache into a public method

Kevin Falcone falcone at bestpractical.com
Wed Oct 8 18:11:57 EDT 2014


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

falcone pushed a commit to branch 3.4/perlcritic
in repository rtir.

commit f24b415f664c2ee9c64875ab151bedbae0c5d197
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Mon Aug 1 16:35:01 2011 -0400

    Promote _FlushCustomFieldsCache into a public method
---
 lib/RT/IR.pm                          | 5 +++--
 t/custom-fields/defaults-on-linking.t | 2 +-
 t/custom-fields/on-transactions.t     | 2 +-
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/lib/RT/IR.pm b/lib/RT/IR.pm
index 3d460d3..8269cb7 100644
--- a/lib/RT/IR.pm
+++ b/lib/RT/IR.pm
@@ -588,8 +588,9 @@ sub CustomFields {
     return wantarray? @list : $list[0];
 }
 
-sub _FlushCustomFieldsCache {
+sub FlushCustomFieldsCache {
     %cache = ();
+    return 1;
 } }
 
 
@@ -666,7 +667,7 @@ if ( RT::IR->HasConstituency ) {
         %RT::IR::ConstituencyCache = ();
         %RT::IR::HasNoQueueCache = ();
         RT::Queue::_FlushQueueHasRightCache();
-        RT::IR::_FlushCustomFieldsCache();
+        RT::IR::FlushCustomFieldsCache();
         RT::IR::_FlushHasConstituencyCache();
         $orig_CleanupRequest->();
     };
diff --git a/t/custom-fields/defaults-on-linking.t b/t/custom-fields/defaults-on-linking.t
index f8d01bb..566ca01 100644
--- a/t/custom-fields/defaults-on-linking.t
+++ b/t/custom-fields/defaults-on-linking.t
@@ -29,7 +29,7 @@ my $cf_name = 'test';
     }
 
     RT::IR::Test->add_rights( Principal => 'everyone', Right => ['SeeCustomField', 'ModifyCustomField']);
-    RT::IR->_FlushCustomFieldsCache;
+    RT::IR->FlushCustomFieldsCache;
 }
 
 
diff --git a/t/custom-fields/on-transactions.t b/t/custom-fields/on-transactions.t
index c63e3f0..4ab46b4 100644
--- a/t/custom-fields/on-transactions.t
+++ b/t/custom-fields/on-transactions.t
@@ -31,7 +31,7 @@ my $cf;
     }
 
     RT::IR::Test->add_rights( Principal => 'everyone', Right => ['SeeCustomField', 'ModifyCustomField']);
-    RT::IR->_FlushCustomFieldsCache;
+    RT::IR->FlushCustomFieldsCache;
 }
 
 RT::Test->started_ok;

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


More information about the rt-commit mailing list