diff options
author | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-08 15:43:39 +0000 |
---|---|---|
committer | brettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-02-08 15:43:39 +0000 |
commit | 2f94af7b91fefe6c0df381464bc0311b04bac582 (patch) | |
tree | d11343f97841676e50915376bee51c9319f7776a /engine/lib/access.php | |
parent | 364a5e7b7f1b448bc70ce6266a5e01eefcd75291 (diff) | |
download | elgg-2f94af7b91fefe6c0df381464bc0311b04bac582.tar.gz elgg-2f94af7b91fefe6c0df381464bc0311b04bac582.tar.bz2 |
Fixes #1496: delete_access_collection() invalidates the access collection cache before attempting to delete. Removed a misplaced unset() in a unit test that was causing test objects not to be properly deleted.
git-svn-id: http://code.elgg.org/elgg/trunk@3922 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/access.php')
-rw-r--r-- | engine/lib/access.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/lib/access.php b/engine/lib/access.php index 4c448721f..d9c241e7a 100644 --- a/engine/lib/access.php +++ b/engine/lib/access.php @@ -373,9 +373,9 @@ function get_write_access_array($user_id = 0, $site_id = 0, $flush = false) { $query .= " AND (ag.owner_guid = {$user_id})"; $query .= " AND ag.id >= 3"; - $tmp_access_array = array( ACCESS_PRIVATE => elgg_echo("PRIVATE"), - ACCESS_FRIENDS => elgg_echo("access:friends:label"), - ACCESS_LOGGED_IN => elgg_echo("LOGGED_IN"), + $tmp_access_array = array( ACCESS_PRIVATE => elgg_echo("PRIVATE"), + ACCESS_FRIENDS => elgg_echo("access:friends:label"), + ACCESS_LOGGED_IN => elgg_echo("LOGGED_IN"), ACCESS_PUBLIC => elgg_echo("PUBLIC")); if ($collections = get_data($query)) { foreach($collections as $collection) { @@ -489,7 +489,7 @@ function update_access_collection($collection_id, $members) { function delete_access_collection($collection_id) { $collection_id = (int) $collection_id; - $collections = get_write_access_array(); + $collections = get_write_access_array(null, null, TRUE); $params = array('collection_id' => $collection_id); if (!trigger_plugin_hook('access:collections:deletecollection', 'collection', $params, true)) { |