aboutsummaryrefslogtreecommitdiff
path: root/engine/classes
diff options
context:
space:
mode:
authorSteve Clay <steve@mrclay.org>2013-02-04 20:55:04 -0500
committerCash Costello <cash.costello@gmail.com>2013-02-09 08:10:40 -0500
commit78e0ec583619cbb728cbe03df857c8219acaac7e (patch)
tree785ec0f364fa5f42b1bf5c82dbbf2d7d88cddf27 /engine/classes
parentf416d7ba66000d485260a8e63962541afa248320 (diff)
downloadelgg-78e0ec583619cbb728cbe03df857c8219acaac7e.tar.gz
elgg-78e0ec583619cbb728cbe03df857c8219acaac7e.tar.bz2
simplify flow, style
Diffstat (limited to 'engine/classes')
-rw-r--r--engine/classes/ElggAttributeLoader.php8
1 files changed, 4 insertions, 4 deletions
diff --git a/engine/classes/ElggAttributeLoader.php b/engine/classes/ElggAttributeLoader.php
index 602bb8bae..2d1c1abde 100644
--- a/engine/classes/ElggAttributeLoader.php
+++ b/engine/classes/ElggAttributeLoader.php
@@ -148,11 +148,11 @@ class ElggAttributeLoader {
if (!is_callable($this->primary_loader)) {
throw new LogicException('Primary attribute loader must be callable');
}
- if (!$this->requires_access_control) {
+ if ($this->requires_access_control) {
+ $fetched = (array) call_user_func($this->primary_loader, $row['guid']);
+ } else {
$ignoring_access = elgg_set_ignore_access();
- }
- $fetched = (array) call_user_func($this->primary_loader, $row['guid']);
- if (!$this->requires_access_control) {
+ $fetched = (array) call_user_func($this->primary_loader, $row['guid']);
elgg_set_ignore_access($ignoring_access);
}
if (!$fetched) {