aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-18 13:52:35 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-07-18 13:52:35 +0000
commit76327dea7fd628825df12427819c46ebb16d9390 (patch)
tree6ef6797f4b6275d19c9bc76bda87d4b3e46e3e71
parenta50a1937ca193ca10553e93c609351a396fe4942 (diff)
downloadelgg-76327dea7fd628825df12427819c46ebb16d9390.tar.gz
elgg-76327dea7fd628825df12427819c46ebb16d9390.tar.bz2
Reinstating plugin hooks for access collections.
git-svn-id: https://code.elgg.org/elgg/trunk@1469 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/access.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php
index 7284ff54d..63df1549b 100644
--- a/engine/lib/access.php
+++ b/engine/lib/access.php
@@ -90,8 +90,12 @@
$access_array[$user_id] = $tmp_access_array;
+ } else {
+ $tmp_access_array = $access_array[$user_id];
}
+ $tmp_access_array = trigger_plugin_hook('access:collections','user',array('user_id' => $user_id, 'site_id' => $site_id),$tmp_access_array);
+
return $access_array[$user_id];
}
@@ -159,13 +163,15 @@
$tmp_access_array[$collection->id] = $collection->name;
}
- $tmp_access_array = trigger_plugin_hook('access','user',array('user_id' => $user_id, 'site_id' => $site_id),$tmp_access_array);
-
$access_array[$user_id] = $tmp_access_array;
+ } else {
+ $tmp_access_array = $access_array[$user_id];
}
- return $access_array[$user_id];
+ $tmp_access_array = trigger_plugin_hook('access:collections:write','user',array('user_id' => $user_id, 'site_id' => $site_id),$tmp_access_array);
+
+ return $tmp_access_array;
}