aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authormarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-20 10:52:22 +0000
committermarcus <marcus@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-11-20 10:52:22 +0000
commit98b31fdc6b48e89c27763532d94f508015380bf1 (patch)
tree3aebca683f92afa901b59665515dbba8e75b7c4a /engine/lib
parentf23568fd0736277e09d0fd22b935dea2335b5a87 (diff)
downloadelgg-98b31fdc6b48e89c27763532d94f508015380bf1.tar.gz
elgg-98b31fdc6b48e89c27763532d94f508015380bf1.tar.bz2
Refs #569, #570, #571: Added get_all_private_settings();
git-svn-id: https://code.elgg.org/elgg/trunk@2469 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/entities.php23
1 files changed, 23 insertions, 0 deletions
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;
}
/**