aboutsummaryrefslogtreecommitdiffstats
path: root/include/items.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-04-27 21:26:52 -0700
committerredmatrix <git@macgirvin.com>2016-04-27 21:26:52 -0700
commitbdef71bda0cbd148e57181275339ae88df9c12fe (patch)
tree08aaac06a1fd81761315a05db4f36ce03e4da92a /include/items.php
parentd4eb5e7c6d4ca944b523125b2e3e10160e50ac94 (diff)
downloadvolse-hubzilla-bdef71bda0cbd148e57181275339ae88df9c12fe.tar.gz
volse-hubzilla-bdef71bda0cbd148e57181275339ae88df9c12fe.tar.bz2
volse-hubzilla-bdef71bda0cbd148e57181275339ae88df9c12fe.zip
provide courtesy function for syncing one item. We'll probably be doing this a lot.
Diffstat (limited to 'include/items.php')
-rwxr-xr-xinclude/items.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/items.php b/include/items.php
index 7947f64a2..2720dd841 100755
--- a/include/items.php
+++ b/include/items.php
@@ -5616,3 +5616,18 @@ function send_profile_photo_activity($channel,$photo,$profile) {
}
+
+function sync_an_item($channel_id,$item_id) {
+
+ $r = q("select * from item where id = %d",
+ intval($item_id)
+ );
+ if($r) {
+ xchan_query($r);
+ $sync_item = fetch_post_tags($r);
+ $rid = q("select * from item_id where iid = %d",
+ intval($item_id)
+ );
+ build_sync_packet($channel_d,array('item' => array(encode_item($sync_item[0],true)),'item_id' => $rid));
+ }
+} \ No newline at end of file