aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/entities.php
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-13 18:06:07 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-08-13 18:06:07 +0000
commit0b6489397a8f5a01c28e61d07548e99ef3e4ff6a (patch)
treefcce8e6e2390169727a80ded32d754b15dd468f7 /engine/lib/entities.php
parentfa67f02d3979211ad1553d7901d2cc104b0b0539 (diff)
downloadelgg-0b6489397a8f5a01c28e61d07548e99ef3e4ff6a.tar.gz
elgg-0b6489397a8f5a01c28e61d07548e99ef3e4ff6a.tar.bz2
Reverted changes so users can now register again.
There are critical issues with enable/disable. Primarily: 1) A number of functions do not use the access controls, these throw an exception when accessing a disabled entity. 2) #243 does not seem possible. git-svn-id: https://code.elgg.org/elgg/trunk@1909 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r--engine/lib/entities.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index b434f8f7f..5a794024b 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1485,7 +1485,8 @@
if ($entity->canEdit()) {
if ($reason)
- $entity->disable_reason = $reason;
+ create_metadata($guid, 'disable_reason', $reason,'', 0, 2);
+ //$entity->disable_reason = $reason;
$res = update_data("UPDATE {$CONFIG->dbprefix}entities set enabled='no' where guid={$guid}");
@@ -1517,7 +1518,10 @@
access_show_hidden_entities($access_status);
- return update_data("UPDATE {$CONFIG->dbprefix}entities set enabled='yes' where guid={$guid}");
+ $result = update_data("UPDATE {$CONFIG->dbprefix}entities set enabled='yes' where guid={$guid}");
+ $entity->clearMetaData('disable_reason');
+
+ return $result;
}
}
}