aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/access.php
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2012-11-14 21:54:13 -0500
committerSteve Clay <steve@mrclay.org>2012-11-14 22:14:55 -0500
commit4f9fb7df0dabfa470e1f7045428c5e47a6ce3919 (patch)
tree8f5e64d83e05584c076ad1b431d032738f1702a9 /engine/lib/access.php
parent3048db0f3f1ade31d6f3a2cdd3268e978a3e3cf3 (diff)
downloadelgg-4f9fb7df0dabfa470e1f7045428c5e47a6ce3919.tar.gz
elgg-4f9fb7df0dabfa470e1f7045428c5e47a6ce3919.tar.bz2
Style cleanup
Diffstat (limited to 'engine/lib/access.php')
-rw-r--r--engine/lib/access.php11
1 files changed, 3 insertions, 8 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index e8b3b0d52..3b2b7aeaa 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -88,11 +88,7 @@ function get_access_array($user_id = 0, $site_id = 0, $flush = false) {
// @todo everything from the db is cached.
// this cache might be redundant. But db cache is flushed on every db write.
- static $access_array;
-
- if (!isset($access_array)) {
- $access_array = array();
- }
+ static $access_array = array();
if ($user_id == 0) {
$user_id = elgg_get_logged_in_user_guid();
@@ -476,7 +472,7 @@ function can_edit_access_collection($collection_id, $user_guid = null) {
return false;
}
- $write_access = get_write_access_array($user->getGUID(), null, true);
+ $write_access = get_write_access_array($user->getGUID(), 0, true);
// don't ignore access when checking users.
if ($user_guid) {
@@ -560,8 +556,6 @@ function create_access_collection($name, $owner_guid = 0, $site_guid = 0) {
* @see remove_user_from_access_collection()
*/
function update_access_collection($collection_id, $members) {
- global $CONFIG;
-
$acl = get_access_collection($collection_id);
if (!$acl) {
@@ -1018,6 +1012,7 @@ function elgg_override_permissions($hook, $type, $value, $params) {
*/
function access_test($hook, $type, $value, $params) {
global $CONFIG;
+
$value[] = $CONFIG->path . 'engine/tests/api/access_collections.php';
return $value;
}