diff options
Diffstat (limited to 'engine/lib/entities.php')
-rw-r--r-- | engine/lib/entities.php | 8 |
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; } } } |