projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3e9c4c
)
ACL Core, add a way for unit tests to flush in-function cache
author
Eileen McNaughton
<eileen@fuzion.co.nz>
Fri, 31 Jan 2014 05:10:04 +0000
(18:10 +1300)
committer
Eileen McNaughton
<eileen@fuzion.co.nz>
Sun, 27 Apr 2014 23:59:05 +0000
(16:59 -0700)
CRM/ACL/API.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/ACL/API.php
b/CRM/ACL/API.php
index d81259b7b4d1dc8bef1a8ff0948ed196e0ac3af6..8463f8b265e421d7d509a6867e0ef297c7264779 100644
(file)
--- a/
CRM/ACL/API.php
+++ b/
CRM/ACL/API.php
@@
-178,10
+178,17
@@
class CRM_ACL_API {
$contactID = NULL,
$tableName = 'civicrm_saved_search',
$allGroups = NULL,
- $includedGroups = NULL
+ $includedGroups = NULL,
+ $flush = FALSE
) {
- static $cache = array();
+ static $cache = array();
+ //@todo this is pretty hacky!!!
+ //adding a way for unit tests to flush the cache
+ if ($flush) {
+ $cache = array();
+ return;
+ }
if (!$contactID) {
$session = CRM_Core_Session::singleton();
$contactID = NULL;