aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
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 /Zotlabs/Module
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 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Channel_calendar.php8
-rw-r--r--Zotlabs/Module/Chat.php6
-rw-r--r--Zotlabs/Module/Connedit.php5
-rw-r--r--Zotlabs/Module/Cover_photo.php6
-rw-r--r--Zotlabs/Module/Defperms.php3
-rw-r--r--Zotlabs/Module/File_upload.php6
-rw-r--r--Zotlabs/Module/Filestorage.php4
-rw-r--r--Zotlabs/Module/Group.php3
-rw-r--r--Zotlabs/Module/Like.php5
-rw-r--r--Zotlabs/Module/Moderate.php4
-rw-r--r--Zotlabs/Module/Notes.php3
-rw-r--r--Zotlabs/Module/Pconfig.php4
-rw-r--r--Zotlabs/Module/Pdledit.php3
-rw-r--r--Zotlabs/Module/Permcats.php5
-rw-r--r--Zotlabs/Module/Photos.php10
-rw-r--r--Zotlabs/Module/Profile_photo.php8
-rw-r--r--Zotlabs/Module/Profiles.php4
-rw-r--r--Zotlabs/Module/Settings/Calendar.php3
-rw-r--r--Zotlabs/Module/Settings/Channel.php3
-rw-r--r--Zotlabs/Module/Settings/Channel_home.php4
-rw-r--r--Zotlabs/Module/Settings/Connections.php3
-rw-r--r--Zotlabs/Module/Settings/Conversation.php3
-rw-r--r--Zotlabs/Module/Settings/Directory.php3
-rw-r--r--Zotlabs/Module/Settings/Display.php3
-rw-r--r--Zotlabs/Module/Settings/Editor.php3
-rw-r--r--Zotlabs/Module/Settings/Events.php3
-rw-r--r--Zotlabs/Module/Settings/Featured.php3
-rw-r--r--Zotlabs/Module/Settings/Features.php4
-rw-r--r--Zotlabs/Module/Settings/Manage.php4
-rw-r--r--Zotlabs/Module/Settings/Network.php3
-rw-r--r--Zotlabs/Module/Settings/Photos.php3
-rw-r--r--Zotlabs/Module/Settings/Profiles.php4
-rw-r--r--Zotlabs/Module/Share.php3
-rw-r--r--Zotlabs/Module/Starred.php3
-rw-r--r--Zotlabs/Module/Tagger.php4
-rw-r--r--Zotlabs/Module/Thing.php8
-rw-r--r--Zotlabs/Module/Wall_attach.php4
37 files changed, 102 insertions, 56 deletions
diff --git a/Zotlabs/Module/Channel_calendar.php b/Zotlabs/Module/Channel_calendar.php
index 5d5fe300a..ae4afb2f3 100644
--- a/Zotlabs/Module/Channel_calendar.php
+++ b/Zotlabs/Module/Channel_calendar.php
@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
require_once('include/conversation.php');
require_once('include/bbcode.php');
require_once('include/datetime.php');
@@ -188,7 +190,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
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));
}
}
}
@@ -430,7 +432,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
if($r) {
$sync_event['event_deleted'] = 1;
- build_sync_packet(0,array('event' => array($sync_event)));
+ Libsync::build_sync_packet(0,array('event' => array($sync_event)));
$i = q("select * from item where resource_type = 'event' and resource_id = '%s' and uid = %d",
dbesc($event_id),
@@ -479,7 +481,7 @@ class Channel_calendar extends \Zotlabs\Web\Controller {
if($ii) {
xchan_query($ii);
$sync_item = fetch_post_tags($ii);
- build_sync_packet($i[0]['uid'],array('item' => array(encode_item($sync_item[0],true))));
+ Libsync::build_sync_packet($i[0]['uid'],array('item' => array(encode_item($sync_item[0],true))));
}
if($complex) {
diff --git a/Zotlabs/Module/Chat.php b/Zotlabs/Module/Chat.php
index db77e2612..6a46cdace 100644
--- a/Zotlabs/Module/Chat.php
+++ b/Zotlabs/Module/Chat.php
@@ -7,9 +7,7 @@ use Zotlabs\Lib\Apps;
use Zotlabs\Web\Controller;
use Zotlabs\Lib\Chatroom;
use Zotlabs\Access\AccessList;
-
-
-
+use Zotlabs\Lib\Libsync;
require_once('include/bookmarks.php');
@@ -80,7 +78,7 @@ class Chat extends Controller {
intval(local_channel())
);
- build_sync_packet(0, array('chatroom' => $x));
+ Libsync::build_sync_packet(0, array('chatroom' => $x));
if($x)
goaway(z_root() . '/chat/' . $channel['channel_address'] . '/' . $x[0]['cr_id']);
diff --git a/Zotlabs/Module/Connedit.php b/Zotlabs/Module/Connedit.php
index acd7cb769..c0df57390 100644
--- a/Zotlabs/Module/Connedit.php
+++ b/Zotlabs/Module/Connedit.php
@@ -9,6 +9,7 @@ namespace Zotlabs\Module;
use Zotlabs\Lib\Apps;
use Zotlabs\Lib\Libzot;
+use Zotlabs\Lib\Libsync;
require_once('include/socgraph.php');
require_once('include/selectors.php');
@@ -382,7 +383,7 @@ class Connedit extends \Zotlabs\Web\Controller {
if($abconfig)
$clone['abconfig'] = $abconfig;
- build_sync_packet(0 /* use the current local_channel */, array('abook' => array($clone)));
+ Libsync::build_sync_packet(0 /* use the current local_channel */, array('abook' => array($clone)));
}
/* @brief Generate content of connection edit page
@@ -558,7 +559,7 @@ class Connedit extends \Zotlabs\Web\Controller {
// PLACEHOLDER
contact_remove(local_channel(), $orig_record[0]['abook_id']);
- build_sync_packet(0 /* use the current local_channel */,
+ Libsync::build_sync_packet(0 /* use the current local_channel */,
array('abook' => array(array(
'abook_xchan' => $orig_record[0]['abook_xchan'],
'entry_deleted' => true))
diff --git a/Zotlabs/Module/Cover_photo.php b/Zotlabs/Module/Cover_photo.php
index d97014f9c..615ca6fe0 100644
--- a/Zotlabs/Module/Cover_photo.php
+++ b/Zotlabs/Module/Cover_photo.php
@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
/*
@file cover_photo.php
@brief Module-file with functions for handling of cover-photos
@@ -66,7 +68,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
$sync = attach_export_data($channel,$r[0]['resource_id']);
if($sync)
- build_sync_packet($channel['channel_id'],array('file' => array($sync)));
+ Libsync::build_sync_packet($channel['channel_id'],array('file' => array($sync)));
}
// Update directory in background
@@ -230,7 +232,7 @@ class Cover_photo extends \Zotlabs\Web\Controller {
$sync = attach_export_data($channel,$base_image['resource_id']);
if($sync)
- build_sync_packet($channel['channel_id'],array('file' => array($sync)));
+ Libsync::build_sync_packet($channel['channel_id'],array('file' => array($sync)));
// Update directory in background
\Zotlabs\Daemon\Master::Summon(array('Directory',$channel['channel_id']));
diff --git a/Zotlabs/Module/Defperms.php b/Zotlabs/Module/Defperms.php
index 463ecb57a..f2f7c10e5 100644
--- a/Zotlabs/Module/Defperms.php
+++ b/Zotlabs/Module/Defperms.php
@@ -4,6 +4,7 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Lib\Apps;
use Zotlabs\Web\Controller;
+use Zotlabs\Lib\Libsync;
require_once('include/socgraph.php');
require_once('include/selectors.php');
@@ -164,7 +165,7 @@ class Defperms extends Controller {
if($abconfig)
$clone['abconfig'] = $abconfig;
- build_sync_packet(0 /* use the current local_channel */, array('abook' => array($clone)));
+ Libsync::build_sync_packet(0 /* use the current local_channel */, array('abook' => array($clone)));
}
/* @brief Generate content of connection default permissions page
diff --git a/Zotlabs/Module/File_upload.php b/Zotlabs/Module/File_upload.php
index 4d1cc4cda..1735e9487 100644
--- a/Zotlabs/Module/File_upload.php
+++ b/Zotlabs/Module/File_upload.php
@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
require_once('include/attach.php');
require_once('include/channel.php');
require_once('include/photos.php');
@@ -41,7 +43,7 @@ class File_upload extends \Zotlabs\Web\Controller {
$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)));
}
goaway(z_root() . '/cloud/' . $channel['channel_address'] . '/' . $r['data']['display_path']);
@@ -97,7 +99,7 @@ class File_upload extends \Zotlabs\Web\Controller {
if($r['success']) {
$sync = attach_export_data($channel,$r['data']['hash']);
if($sync)
- build_sync_packet($channel['channel_id'],array('file' => array($sync)));
+ Libsync::build_sync_packet($channel['channel_id'],array('file' => array($sync)));
}
}
diff --git a/Zotlabs/Module/Filestorage.php b/Zotlabs/Module/Filestorage.php
index 2c247cd65..c40de2823 100644
--- a/Zotlabs/Module/Filestorage.php
+++ b/Zotlabs/Module/Filestorage.php
@@ -5,7 +5,7 @@ namespace Zotlabs\Module;
*
*/
-
+use Zotlabs\Lib\Libsync;
class Filestorage extends \Zotlabs\Web\Controller {
@@ -131,7 +131,7 @@ class Filestorage extends \Zotlabs\Web\Controller {
if(! $admin_delete) {
$sync = attach_export_data($channel, $f['hash'], true);
if($sync) {
- build_sync_packet($channel['channel_id'], array('file' => array($sync)));
+ Libsync::build_sync_packet($channel['channel_id'], array('file' => array($sync)));
}
}
diff --git a/Zotlabs/Module/Group.php b/Zotlabs/Module/Group.php
index f836978ee..993d428f5 100644
--- a/Zotlabs/Module/Group.php
+++ b/Zotlabs/Module/Group.php
@@ -4,6 +4,7 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Web\Controller;
use Zotlabs\Lib\Apps;
+use Zotlabs\Lib\Libsync;
require_once('include/group.php');
@@ -80,7 +81,7 @@ class Group extends Controller {
info( t('Privacy group updated.') . EOL );
- build_sync_packet(local_channel(),null,true);
+ Libsync::build_sync_packet(local_channel(),null,true);
}
goaway(z_root() . '/group/' . argv(1) . '/' . argv(2));
diff --git a/Zotlabs/Module/Like.php b/Zotlabs/Module/Like.php
index e4636a4a6..61f73bfd5 100644
--- a/Zotlabs/Module/Like.php
+++ b/Zotlabs/Module/Like.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module;
use Zotlabs\Lib\Activity;
+use Zotlabs\Lib\Libsync;
require_once('include/security.php');
require_once('include/bbcode.php');
@@ -235,7 +236,7 @@ class Like extends \Zotlabs\Web\Controller {
if($z) {
$z[0]['deleted'] = 1;
- build_sync_packet($ch[0]['channel_id'],array('likes' => $z));
+ Libsync::build_sync_packet($ch[0]['channel_id'],array('likes' => $z));
q("delete from likes where id = %d",
intval($z[0]['id'])
@@ -566,7 +567,7 @@ class Like extends \Zotlabs\Web\Controller {
dbesc($obj_id)
);
if($r)
- build_sync_packet($ch[0]['channel_id'],array('likes' => $r));
+ Libsync::build_sync_packet($ch[0]['channel_id'],array('likes' => $r));
}
diff --git a/Zotlabs/Module/Moderate.php b/Zotlabs/Module/Moderate.php
index a7c98e05e..f1bff3c50 100644
--- a/Zotlabs/Module/Moderate.php
+++ b/Zotlabs/Module/Moderate.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
require_once('include/conversation.php');
@@ -77,7 +79,7 @@ class Moderate extends \Zotlabs\Web\Controller {
if($r) {
xchan_query($r);
$sync_item = fetch_post_tags($r);
- build_sync_packet(local_channel(),array('item' => array(encode_item($sync_item[0],true))));
+ Libsync::build_sync_packet(local_channel(),array('item' => array(encode_item($sync_item[0],true))));
}
if($action === 'approve') {
\Zotlabs\Daemon\Master::Summon(array('Notifier', 'comment-new', $post_id));
diff --git a/Zotlabs/Module/Notes.php b/Zotlabs/Module/Notes.php
index 7572f7420..b448cff83 100644
--- a/Zotlabs/Module/Notes.php
+++ b/Zotlabs/Module/Notes.php
@@ -4,6 +4,7 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Web\Controller;
use Zotlabs\Lib\Apps;
+use Zotlabs\Lib\Libsync;
/**
* @brief Notes Module controller.
@@ -38,7 +39,7 @@ class Notes extends Controller {
if((argc() > 1) && (argv(1) === 'sync')) {
require_once('include/zot.php');
- build_sync_packet();
+ Libsync::build_sync_packet();
}
logger('notes saved.', LOGGER_DEBUG);
diff --git a/Zotlabs/Module/Pconfig.php b/Zotlabs/Module/Pconfig.php
index 06b94b34f..b2b5d4386 100644
--- a/Zotlabs/Module/Pconfig.php
+++ b/Zotlabs/Module/Pconfig.php
@@ -1,7 +1,7 @@
<?php
namespace Zotlabs\Module;
-
+use Zotlabs\Lib\Libsync;
@@ -38,7 +38,7 @@ class Pconfig extends \Zotlabs\Web\Controller {
}
set_pconfig(local_channel(),$cat,$k,$v);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($aj)
killme();
diff --git a/Zotlabs/Module/Pdledit.php b/Zotlabs/Module/Pdledit.php
index 5cedb29a8..36201544f 100644
--- a/Zotlabs/Module/Pdledit.php
+++ b/Zotlabs/Module/Pdledit.php
@@ -4,6 +4,7 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Web\Controller;
use Zotlabs\Lib\Apps;
+use Zotlabs\Lib\Libsync;
class Pdledit extends Controller {
@@ -22,7 +23,7 @@ class Pdledit extends Controller {
goaway(z_root() . '/pdledit');
}
set_pconfig(local_channel(),'system','mod_' . $_REQUEST['module'] . '.pdl',escape_tags($_REQUEST['content']));
- build_sync_packet();
+ Libsync::build_sync_packet();
info( t('Layout updated.') . EOL);
goaway(z_root() . '/pdledit/' . $_REQUEST['module']);
}
diff --git a/Zotlabs/Module/Permcats.php b/Zotlabs/Module/Permcats.php
index 75ac2ac87..6a599282c 100644
--- a/Zotlabs/Module/Permcats.php
+++ b/Zotlabs/Module/Permcats.php
@@ -5,6 +5,7 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Web\Controller;
use Zotlabs\Lib\Apps;
+use Zotlabs\Lib\Libsync;
class Permcats extends Controller {
@@ -42,7 +43,7 @@ class Permcats extends Controller {
\Zotlabs\Lib\Permcat::update(local_channel(),$name,$pcarr);
- build_sync_packet();
+ Libsync::build_sync_packet();
info( t('Permission category saved.') . EOL);
@@ -71,7 +72,7 @@ class Permcats extends Controller {
if(argc() > 2 && argv(2) === 'drop') {
\Zotlabs\Lib\Permcat::delete(local_channel(),$name);
- build_sync_packet();
+ Libsync::build_sync_packet();
json_return_and_die([ 'success' => true ]);
}
diff --git a/Zotlabs/Module/Photos.php b/Zotlabs/Module/Photos.php
index 43c9f86ee..fae8c17f6 100644
--- a/Zotlabs/Module/Photos.php
+++ b/Zotlabs/Module/Photos.php
@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
require_once('include/photo/photo_driver.php');
require_once('include/photos.php');
require_once('include/items.php');
@@ -162,7 +164,7 @@ class Photos extends \Zotlabs\Web\Controller {
$sync = attach_export_data(\App::$data['channel'],$folder_hash, true);
if($sync)
- build_sync_packet($page_owner_uid,array('file' => array($sync)));
+ Libsync::build_sync_packet($page_owner_uid,array('file' => array($sync)));
}
}
@@ -189,7 +191,7 @@ class Photos extends \Zotlabs\Web\Controller {
$sync = attach_export_data(\App::$data['channel'],$r[0]['resource_id'], true);
if($sync)
- build_sync_packet($page_owner_uid,array('file' => array($sync)));
+ Libsync::build_sync_packet($page_owner_uid,array('file' => array($sync)));
}
elseif(is_site_admin()) {
// If the admin deletes a photo, don't sync
@@ -210,7 +212,7 @@ class Photos extends \Zotlabs\Web\Controller {
$sync = attach_export_data(\App::$data['channel'],argv(2),true);
if($sync)
- build_sync_packet($page_owner_uid,array('file' => array($sync)));
+ Libsync::build_sync_packet($page_owner_uid,array('file' => array($sync)));
if(! ($_POST['desc'] && $_POST['newtag']))
goaway(z_root() . '/' . $_SESSION['photo_return']);
@@ -420,7 +422,7 @@ class Photos extends \Zotlabs\Web\Controller {
$sync = attach_export_data(\App::$data['channel'],$resource_id);
if($sync)
- build_sync_packet($page_owner_uid,array('file' => array($sync)));
+ Libsync::build_sync_packet($page_owner_uid,array('file' => array($sync)));
goaway(z_root() . '/' . $_SESSION['photo_return']);
return; // NOTREACHED
diff --git a/Zotlabs/Module/Profile_photo.php b/Zotlabs/Module/Profile_photo.php
index a812ca210..d6c80b653 100644
--- a/Zotlabs/Module/Profile_photo.php
+++ b/Zotlabs/Module/Profile_photo.php
@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
/*
* @file Profile_photo.php
* @brief Module-file with functions for handling of profile-photos
@@ -73,7 +75,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
$sync = attach_export_data($channel,$r[0]['resource_id']);
if($sync)
- build_sync_packet($channel['channel_id'],array('file' => array($sync)));
+ Libsync:: build_sync_packet($channel['channel_id'],array('file' => array($sync)));
}
$_SESSION['reload_avatar'] = true;
@@ -243,7 +245,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
$sync = attach_export_data($channel,$base_image['resource_id']);
if($sync)
- build_sync_packet($channel['channel_id'],array('file' => array($sync), 'profile' => $sync_profiles));
+ Libsync::build_sync_packet($channel['channel_id'],array('file' => array($sync), 'profile' => $sync_profiles));
// Similarly, tell the nav bar to bypass the cache and update the avatar image.
@@ -411,7 +413,7 @@ class Profile_photo extends \Zotlabs\Web\Controller {
$sync = attach_export_data($channel,$resource_id);
if($sync)
- build_sync_packet($channel['channel_id'],array('file' => array($sync)));
+ Libsync::build_sync_packet($channel['channel_id'],array('file' => array($sync)));
$_SESSION['reload_avatar'] = true;
diff --git a/Zotlabs/Module/Profiles.php b/Zotlabs/Module/Profiles.php
index 33e7d8a9d..7deceabab 100644
--- a/Zotlabs/Module/Profiles.php
+++ b/Zotlabs/Module/Profiles.php
@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
require_once('include/channel.php');
require_once('include/selectors.php');
@@ -599,7 +601,7 @@ class Profiles extends \Zotlabs\Web\Controller {
);
if($r) {
require_once('include/zot.php');
- build_sync_packet(local_channel(),array('profile' => $r));
+ Libsync::build_sync_packet(local_channel(),array('profile' => $r));
}
$channel = \App::get_channel();
diff --git a/Zotlabs/Module/Settings/Calendar.php b/Zotlabs/Module/Settings/Calendar.php
index 0298b412e..ab85eb450 100644
--- a/Zotlabs/Module/Settings/Calendar.php
+++ b/Zotlabs/Module/Settings/Calendar.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Calendar {
@@ -15,7 +16,7 @@ class Calendar {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index b0115d352..ab9b72490 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -3,6 +3,7 @@
namespace Zotlabs\Module\Settings;
use Zotlabs\Lib\Apps;
+use Zotlabs\Lib\Libsync;
require_once('include/selectors.php');
@@ -286,7 +287,7 @@ class Channel {
\Zotlabs\Daemon\Master::Summon(array('Directory',local_channel()));
- build_sync_packet();
+ Libsync::build_sync_packet();
if($email_changed && \App::$config['system']['register_policy'] == REGISTER_VERIFY) {
diff --git a/Zotlabs/Module/Settings/Channel_home.php b/Zotlabs/Module/Settings/Channel_home.php
index b6ecf4ff1..e8faa7fb2 100644
--- a/Zotlabs/Module/Settings/Channel_home.php
+++ b/Zotlabs/Module/Settings/Channel_home.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
+
require_once('include/menu.php');
class Channel_home {
@@ -24,7 +26,7 @@ class Channel_home {
$channel_menu = ((x($_POST['channel_menu'])) ? htmlspecialchars_decode(trim($_POST['channel_menu']),ENT_QUOTES) : '');
set_pconfig(local_channel(),'system','channel_menu',$channel_menu);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Connections.php b/Zotlabs/Module/Settings/Connections.php
index cac357791..4369deb27 100644
--- a/Zotlabs/Module/Settings/Connections.php
+++ b/Zotlabs/Module/Settings/Connections.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Connections {
@@ -15,7 +16,7 @@ class Connections {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Conversation.php b/Zotlabs/Module/Settings/Conversation.php
index 43e59a3c2..aa0ff6a7e 100644
--- a/Zotlabs/Module/Settings/Conversation.php
+++ b/Zotlabs/Module/Settings/Conversation.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Conversation {
@@ -15,7 +16,7 @@ class Conversation {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['aj']) {
if($_POST['auto_update'] == 1)
diff --git a/Zotlabs/Module/Settings/Directory.php b/Zotlabs/Module/Settings/Directory.php
index 13fe6eb79..d1dd0677e 100644
--- a/Zotlabs/Module/Settings/Directory.php
+++ b/Zotlabs/Module/Settings/Directory.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Directory {
@@ -15,7 +16,7 @@ class Directory {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Display.php b/Zotlabs/Module/Settings/Display.php
index 45d80e011..f553fc057 100644
--- a/Zotlabs/Module/Settings/Display.php
+++ b/Zotlabs/Module/Settings/Display.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Display {
@@ -78,7 +79,7 @@ class Display {
);
call_hooks('display_settings_post', $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
goaway(z_root() . '/settings/display' );
return; // NOTREACHED
}
diff --git a/Zotlabs/Module/Settings/Editor.php b/Zotlabs/Module/Settings/Editor.php
index 5e7a9473a..cf6dd2807 100644
--- a/Zotlabs/Module/Settings/Editor.php
+++ b/Zotlabs/Module/Settings/Editor.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Editor {
@@ -15,7 +16,7 @@ class Editor {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Events.php b/Zotlabs/Module/Settings/Events.php
index eb6dda99b..ab393c932 100644
--- a/Zotlabs/Module/Settings/Events.php
+++ b/Zotlabs/Module/Settings/Events.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Events {
@@ -15,7 +16,7 @@ class Events {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Featured.php b/Zotlabs/Module/Settings/Featured.php
index d5d740aff..d615e176c 100644
--- a/Zotlabs/Module/Settings/Featured.php
+++ b/Zotlabs/Module/Settings/Featured.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Featured {
@@ -10,7 +11,7 @@ class Featured {
call_hooks('feature_settings_post', $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
return;
}
diff --git a/Zotlabs/Module/Settings/Features.php b/Zotlabs/Module/Settings/Features.php
index 6a3ab104b..553ff0836 100644
--- a/Zotlabs/Module/Settings/Features.php
+++ b/Zotlabs/Module/Settings/Features.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
+
class Features {
@@ -19,7 +21,7 @@ class Features {
set_pconfig(local_channel(),'feature', $k, '');
}
}
- build_sync_packet();
+ Libsync::build_sync_packet();
return;
}
diff --git a/Zotlabs/Module/Settings/Manage.php b/Zotlabs/Module/Settings/Manage.php
index 9bae12022..cbc494cf8 100644
--- a/Zotlabs/Module/Settings/Manage.php
+++ b/Zotlabs/Module/Settings/Manage.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
+
class Manage {
@@ -15,7 +17,7 @@ class Manage {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Network.php b/Zotlabs/Module/Settings/Network.php
index ae02b06e9..9f5bdb2e5 100644
--- a/Zotlabs/Module/Settings/Network.php
+++ b/Zotlabs/Module/Settings/Network.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Network {
@@ -21,7 +22,7 @@ class Network {
set_pconfig(local_channel(),'system','network_divmore_height', $network_divmore_height);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Photos.php b/Zotlabs/Module/Settings/Photos.php
index 9edbaa929..8195d660b 100644
--- a/Zotlabs/Module/Settings/Photos.php
+++ b/Zotlabs/Module/Settings/Photos.php
@@ -2,6 +2,7 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
class Photos {
@@ -15,7 +16,7 @@ class Photos {
process_module_features_post(local_channel(), $features, $_POST);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Settings/Profiles.php b/Zotlabs/Module/Settings/Profiles.php
index fb6abf664..67b03e04f 100644
--- a/Zotlabs/Module/Settings/Profiles.php
+++ b/Zotlabs/Module/Settings/Profiles.php
@@ -2,6 +2,8 @@
namespace Zotlabs\Module\Settings;
+use Zotlabs\Lib\Libsync;
+
require_once('include/selectors.php');
class Profiles {
@@ -19,7 +21,7 @@ class Profiles {
$profile_assign = ((x($_POST,'profile_assign')) ? notags(trim($_POST['profile_assign'])) : '');
set_pconfig(local_channel(),'system','profile_assign',$profile_assign);
- build_sync_packet();
+ Libsync::build_sync_packet();
if($_POST['rpath'])
goaway($_POST['rpath']);
diff --git a/Zotlabs/Module/Share.php b/Zotlabs/Module/Share.php
index a18a81937..c0db9978e 100644
--- a/Zotlabs/Module/Share.php
+++ b/Zotlabs/Module/Share.php
@@ -4,6 +4,7 @@ namespace Zotlabs\Module;
use App;
use Zotlabs\Daemon\Master;
use Zotlabs\Lib\Activity;
+use Zotlabs\Lib\Libsync;
require_once('include/security.php');
@@ -124,7 +125,7 @@ class Share extends \Zotlabs\Web\Controller {
if($r) {
xchan_query($r);
$sync_item = fetch_post_tags($r);
- build_sync_packet($channel['channel_id'], [ 'item' => [ encode_item($sync_item[0],true) ] ]);
+ Libsync::build_sync_packet($channel['channel_id'], [ 'item' => [ encode_item($sync_item[0],true) ] ]);
}
Master::Summon([ 'Notifier','like',$post_id ]);
diff --git a/Zotlabs/Module/Starred.php b/Zotlabs/Module/Starred.php
index 8349ae25c..2d7063669 100644
--- a/Zotlabs/Module/Starred.php
+++ b/Zotlabs/Module/Starred.php
@@ -1,6 +1,7 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
class Starred extends \Zotlabs\Web\Controller {
@@ -37,7 +38,7 @@ class Starred extends \Zotlabs\Web\Controller {
if($r) {
xchan_query($r);
$sync_item = fetch_post_tags($r);
- build_sync_packet(local_channel(),[
+ Libsync::build_sync_packet(local_channel(),[
'item' => [
encode_item($sync_item[0],true)
]
diff --git a/Zotlabs/Module/Tagger.php b/Zotlabs/Module/Tagger.php
index e6e80dce3..4fbfb7070 100644
--- a/Zotlabs/Module/Tagger.php
+++ b/Zotlabs/Module/Tagger.php
@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
require_once('include/security.php');
require_once('include/bbcode.php');
require_once('include/items.php');
@@ -149,7 +151,7 @@ class Tagger extends \Zotlabs\Web\Controller {
$ret = post_activity_item($arr);
if($ret['success']) {
- build_sync_packet(local_channel(),
+ Libsync::build_sync_packet(local_channel(),
[
'item' => [ encode_item($ret['activity'],true) ]
]
diff --git a/Zotlabs/Module/Thing.php b/Zotlabs/Module/Thing.php
index c3d8ff802..b065b0022 100644
--- a/Zotlabs/Module/Thing.php
+++ b/Zotlabs/Module/Thing.php
@@ -5,6 +5,8 @@
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
require_once('include/items.php');
require_once('include/security.php');
require_once('include/selectors.php');
@@ -124,7 +126,7 @@ class Thing extends \Zotlabs\Web\Controller {
dbesc($term_hash)
);
if($r) {
- build_sync_packet(0, array('obj' => $r));
+ Libsync::build_sync_packet(0, array('obj' => $r));
}
return;
@@ -180,7 +182,7 @@ class Thing extends \Zotlabs\Web\Controller {
dbesc($hash)
);
if($r) {
- build_sync_packet(0, array('obj' => $r));
+ Libsync::build_sync_packet(0, array('obj' => $r));
}
if($activity) {
@@ -353,7 +355,7 @@ class Thing extends \Zotlabs\Web\Controller {
$r[0]['obj_deleted'] = 1;
- build_sync_packet(0,array('obj' => $r));
+ Libsync::build_sync_packet(0,array('obj' => $r));
return $o;
}
diff --git a/Zotlabs/Module/Wall_attach.php b/Zotlabs/Module/Wall_attach.php
index e1088d18f..2c0eeec77 100644
--- a/Zotlabs/Module/Wall_attach.php
+++ b/Zotlabs/Module/Wall_attach.php
@@ -1,6 +1,8 @@
<?php
namespace Zotlabs\Module;
+use Zotlabs\Lib\Libsync;
+
require_once('include/attach.php');
require_once('include/photos.php');
@@ -134,7 +136,7 @@ class Wall_attach extends \Zotlabs\Web\Controller {
$sync = attach_export_data($channel,$r['data']['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($using_api)