diff options
author | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-04 18:16:08 +0000 |
---|---|---|
committer | ben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2009-03-04 18:16:08 +0000 |
commit | badf872aaeed7b18838a1566a4621f7bffa20fab (patch) | |
tree | 5d56906da226574de7b7b0beb242048d4327ff19 /engine/lib/river2.php | |
parent | 0f97c0d4c48ed779c985d9ac4288db65c127234c (diff) | |
download | elgg-badf872aaeed7b18838a1566a4621f7bffa20fab.tar.gz elgg-badf872aaeed7b18838a1566a4621f7bffa20fab.tar.bz2 |
River access issues
git-svn-id: https://code.elgg.org/elgg/trunk@3083 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/river2.php')
-rw-r--r-- | engine/lib/river2.php | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/engine/lib/river2.php b/engine/lib/river2.php index 9d62d88f7..df985b45e 100644 --- a/engine/lib/river2.php +++ b/engine/lib/river2.php @@ -102,6 +102,29 @@ return delete_data("delete from {$CONFIG->dbprefix}river where object_guid = {$object_guid}");
}
+
+ /**
+ * Sets the access ID on river items for a particular object
+ *
+ * @param int $object_guid The GUID of the entity
+ * @param int $access_id The access ID
+ * @return true|false Depending on success
+ */
+ function update_river_access_by_object(
+ $object_guid, $access_id
+ ) {
+
+ // Sanitise
+ $object_guid = (int) $object_guid;
+ $access_id = (int) $access_id;
+
+ // Load config
+ global $CONFIG;
+
+ // Remove
+ return update_data("update {$CONFIG->dbprefix}river set access_id = {$access_id} where object_guid = {$object_guid}");
+
+ }
/**
* Retrieves items from the river. All parameters are optional.
@@ -129,7 +152,7 @@ $offset = 0,
$posted_min = 0,
$posted_max = 0
- ) {
+ ) {
// Get config
global $CONFIG;
|