aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2020-04-09 09:38:36 +0000
committerMario <mario@mariovavti.com>2020-04-09 09:38:36 +0000
commit328685d2fbe505fd5b1bf9892a0cce993210ac52 (patch)
tree5c2a800872074fa86c284e95382dc6d535cfd9b2 /include
parent806c738923b9d880af49a1811d8fbf2c2ee36309 (diff)
downloadvolse-hubzilla-328685d2fbe505fd5b1bf9892a0cce993210ac52.tar.gz
volse-hubzilla-328685d2fbe505fd5b1bf9892a0cce993210ac52.tar.bz2
volse-hubzilla-328685d2fbe505fd5b1bf9892a0cce993210ac52.zip
move from build_sync_packet() to Libsync::build_sync_packet()
Diffstat (limited to 'include')
-rw-r--r--include/attach.php6
-rw-r--r--include/channel.php4
-rw-r--r--include/event.php3
-rw-r--r--include/group.php9
-rwxr-xr-xinclude/items.php9
-rw-r--r--include/menu.php4
6 files changed, 21 insertions, 14 deletions
diff --git a/include/attach.php b/include/attach.php
index 952270949..d986f4af1 100644
--- a/include/attach.php
+++ b/include/attach.php
@@ -11,6 +11,8 @@
* @todo Also an 'append' option to the storage function might be a useful addition.
*/
+use Zotlabs\Lib\Libsync;
+
require_once('include/permissions.php');
require_once('include/security.php');
require_once('include/group.php');
@@ -1018,7 +1020,7 @@ function attach_store($channel, $observer_hash, $options = '', $arr = null) {
$sync = attach_export_data($channel,$hash);
if($sync)
- build_sync_packet($channel['channel_id'],array('file' => array($sync)));
+ Libsync::build_sync_packet($channel['channel_id'],array('file' => array($sync)));
}
if($notify) {
@@ -1403,7 +1405,7 @@ function attach_change_permissions($channel_id, $resource, $allow_cid, $allow_gi
$data = attach_export_data($channel,$resource);
if($data)
- build_sync_packet($channel['channel_id'],array('file' => array($data)));
+ Libsync::build_sync_packet($channel['channel_id'],array('file' => array($data)));
}
}
diff --git a/include/channel.php b/include/channel.php
index 25eb93cac..be58f154a 100644
--- a/include/channel.php
+++ b/include/channel.php
@@ -673,7 +673,7 @@ function change_channel_keys($channel) {
}
}
- build_sync_packet($channel['channel_id'], [ 'keychange' => $stored ]);
+ Libsync::build_sync_packet($channel['channel_id'], [ 'keychange' => $stored ]);
$a = q("select * from abook where abook_xchan = '%s' and abook_self = 1",
dbesc($stored['old_hash'])
@@ -2241,7 +2241,7 @@ function profiles_build_sync($channel_id,$send = true) {
);
if($r) {
if($send) {
- build_sync_packet($channel_id,array('profile' => $r));
+ Libsync::build_sync_packet($channel_id,array('profile' => $r));
}
else {
return $r;
diff --git a/include/event.php b/include/event.php
index 69ca64e0f..c9cbb7c94 100644
--- a/include/event.php
+++ b/include/event.php
@@ -8,6 +8,7 @@
use Sabre\VObject;
use Zotlabs\Lib\Activity;
+use Zotlabs\Lib\Libsync;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
@@ -663,7 +664,7 @@ function event_addtocal($item_id, $uid) {
intval($channel['channel_id'])
);
if($z) {
- build_sync_packet($channel['channel_id'],array('event_item' => array(encode_item($sync_item[0],true)),'event' => $z));
+ Libsync::build_sync_packet($channel['channel_id'],array('event_item' => array(encode_item($sync_item[0],true)),'event' => $z));
}
return true;
}
diff --git a/include/group.php b/include/group.php
index 6011af08f..efda389d6 100644
--- a/include/group.php
+++ b/include/group.php
@@ -1,5 +1,6 @@
<?php /** @file */
+use Zotlabs\Lib\Libsync;
function group_add($uid,$name,$public = 0) {
@@ -44,7 +45,7 @@ function group_add($uid,$name,$public = 0) {
$ret = $r;
}
- build_sync_packet($uid,null,true);
+ Libsync::build_sync_packet($uid,null,true);
return $ret;
}
@@ -113,7 +114,7 @@ function group_rmv($uid,$name) {
}
- build_sync_packet($uid,null,true);
+ Libsync::build_sync_packet($uid,null,true);
return $ret;
}
@@ -155,7 +156,7 @@ function group_rmv_member($uid,$name,$member) {
dbesc($member)
);
- build_sync_packet($uid,null,true);
+ Libsync::build_sync_packet($uid,null,true);
return $r;
@@ -186,7 +187,7 @@ function group_add_member($uid,$name,$member,$gid = 0) {
dbesc($member)
);
- build_sync_packet($uid,null,true);
+ Libsync::build_sync_packet($uid,null,true);
return $r;
}
diff --git a/include/items.php b/include/items.php
index 9768fdf23..6fe5e1f0b 100755
--- a/include/items.php
+++ b/include/items.php
@@ -10,6 +10,7 @@ use Zotlabs\Lib\MessageFilter;
use Zotlabs\Lib\ThreadListener;
use Zotlabs\Lib\IConfig;
use Zotlabs\Lib\Activity;
+use Zotlabs\Lib\Libsync;
use Zotlabs\Access\PermissionLimits;
use Zotlabs\Access\AccessList;
use Zotlabs\Daemon\Master;
@@ -3873,7 +3874,7 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL) {
if($x) {
$sync_data['event_deleted'] = 1;
- build_sync_packet($item['uid'], ['event' => [$sync_data]]);
+ Libsync::build_sync_packet($item['uid'], ['event' => [$sync_data]]);
}
}
@@ -3882,7 +3883,7 @@ function delete_item_lowlevel($item, $stage = DROPITEM_NORMAL) {
$channel = channelx_by_n($item['uid']);
$sync_data = attach_export_data($channel, $item['resource_id'], true);
if($sync_data)
- build_sync_packet($item['uid'], ['file' => [$sync_data]]);
+ Libsync::build_sync_packet($item['uid'], ['file' => [$sync_data]]);
}
// immediately remove any undesired profile likes.
@@ -4726,7 +4727,7 @@ function sync_an_item($channel_id,$item_id) {
if($r) {
xchan_query($r);
$sync_item = fetch_post_tags($r);
- build_sync_packet($channel_id, array('item' => array(encode_item($sync_item[0],true))));
+ Libsync::build_sync_packet($channel_id, array('item' => array(encode_item($sync_item[0],true))));
}
}
@@ -4928,7 +4929,7 @@ function item_create_edit_activity($post) {
if($r) {
xchan_query($r);
$sync_item = fetch_post_tags($r);
- build_sync_packet($new_item['uid'],array('item' => array(encode_item($sync_item[0],true))));
+ Libsync::build_sync_packet($new_item['uid'],array('item' => array(encode_item($sync_item[0],true))));
}
}
diff --git a/include/menu.php b/include/menu.php
index 1a2059451..88863f57b 100644
--- a/include/menu.php
+++ b/include/menu.php
@@ -1,5 +1,7 @@
<?php /** @file */
+use Zotlabs\Lib\Libsync;
+
require_once('include/security.php');
require_once('include/bbcode.php');
@@ -405,7 +407,7 @@ function menu_sync_packet($uid,$observer_hash,$menu_id,$delete = false) {
if($m) {
if($delete)
$m['menu_delete'] = 1;
- build_sync_packet($uid,array('menu' => array(menu_element($c,$m))));
+ Libsync::build_sync_packet($uid,array('menu' => array(menu_element($c,$m))));
}
}
}