From 98b31fdc6b48e89c27763532d94f508015380bf1 Mon Sep 17 00:00:00 2001 From: marcus Date: Thu, 20 Nov 2008 10:52:22 +0000 Subject: Refs #569, #570, #571: Added get_all_private_settings(); git-svn-id: https://code.elgg.org/elgg/trunk@2469 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/entities.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'engine/lib/entities.php') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 91314a882..8e28d4f52 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -2170,6 +2170,29 @@ } return false; + } + + /** + * Return an array of all private settings for a given + * + * @param int $entity_guid The entity GUID + */ + function get_all_private_settings($entity_guid) { + global $CONFIG; + + $entity_guid = (int) $entity_guid; + + $result = get_data("select * from {$CONFIG->prefix}private_settings where entity_guid = {$entity_guid}"); + if ($result) + { + $return = array(); + foreach ($result as $r) + $return[$r->name] = $r->value; + + return $return; + } + + return false; } /** -- cgit v1.2.3