aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2012-01-23 17:45:29 -0800
committerBrett Profitt <brett.profitt@gmail.com>2012-01-23 17:45:29 -0800
commit84f5b437767ee21c21cff025660a16839f9ac372 (patch)
tree3eea1be37c14e23373aa35ded77c455abcd1a42d /engine/lib/entities.php
parent2e499d0f1e62267105dbe1ff2457cd6098765983 (diff)
downloadelgg-84f5b437767ee21c21cff025660a16839f9ac372.tar.gz
elgg-84f5b437767ee21c21cff025660a16839f9ac372.tar.bz2
Fixes #1196. Added elgg_set_ignore_access() calls to disable_entity() when called with recursive = true.
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index f3bf9fb29..67011b802 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1378,6 +1378,10 @@ function disable_entity($guid, $reason = "", $recursive = true) {
}
if ($recursive) {
+ $hidden = access_get_show_hidden_status();
+ access_show_hidden_entities(true);
+ $ia = elgg_set_ignore_access(true);
+
$sub_entities = get_data("SELECT * FROM {$CONFIG->dbprefix}entities
WHERE (
container_guid = $guid
@@ -1391,6 +1395,8 @@ function disable_entity($guid, $reason = "", $recursive = true) {
$e->disable($reason);
}
}
+ access_show_hidden_entities($hidden);
+ elgg_set_ignore_access($ia);
}
$entity->disableMetadata();