Merge pull request #5769 from monishdeb/CRM-16433
[civicrm-core.git] / CRM / ACL / API.php
index 5bf1787529a22bedd0e35e4e51934a5106f620cc..f3681b3fa8702eb91c056b0150f1f95fd82cb7d1 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.6                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014                                |
+ | Copyright CiviCRM LLC (c) 2004-2015                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
 /**
  *
  * @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
  * $Id$
  *
  */
 class CRM_ACL_API {
 
   /**
-   * The various type of permissions
+   * The various type of permissions.
    *
    * @var int
    */
@@ -72,7 +72,7 @@ class CRM_ACL_API {
   }
 
   /**
-   * Get the permissioned where clause for the user
+   * Get the permissioned where clause for the user.
    *
    * @param int $type
    *   The type of permission needed.
@@ -143,7 +143,7 @@ class CRM_ACL_API {
   }
 
   /**
-   * Get all the groups the user has access to for the given operation
+   * Get all the groups the user has access to for the given operation.
    *
    * @param int $type
    *   The type of permission needed.
@@ -204,6 +204,7 @@ class CRM_ACL_API {
   ) {
 
     static $cache = array();
+    $groups = array();
     //@todo this is pretty hacky!!!
     //adding a way for unit tests to flush the cache
     if ($flush) {