mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
move from build_sync_packet() to Libsync::build_sync_packet()
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Zotlabs\Daemon;
|
||||
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
class Cron {
|
||||
|
||||
static public function run($argc,$argv) {
|
||||
@@ -147,7 +149,7 @@ class Cron {
|
||||
if($z) {
|
||||
xchan_query($z);
|
||||
$sync_item = fetch_post_tags($z);
|
||||
build_sync_packet($sync_item[0]['uid'],
|
||||
Libsync::build_sync_packet($sync_item[0]['uid'],
|
||||
[
|
||||
'item' => [ encode_item($sync_item[0],true) ]
|
||||
]
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Zotlabs\Daemon;
|
||||
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
class Importfile {
|
||||
|
||||
static public function run($argc,$argv){
|
||||
@@ -40,7 +42,7 @@ class Importfile {
|
||||
|
||||
$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)));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Zotlabs\Lib;
|
||||
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
require_once('include/plugin.php');
|
||||
require_once('include/channel.php');
|
||||
|
||||
@@ -603,7 +605,7 @@ class Apps {
|
||||
intval(TERM_OBJ_APP),
|
||||
intval($r[0]['id'])
|
||||
);
|
||||
build_sync_packet($uid,array('app' => $r[0]));
|
||||
Libsync::build_sync_packet($uid,array('app' => $r[0]));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -669,7 +671,7 @@ class Apps {
|
||||
);
|
||||
}
|
||||
if(! intval($x[0]['app_system'])) {
|
||||
build_sync_packet($uid,array('app' => $x));
|
||||
Libsync::build_sync_packet($uid,array('app' => $x));
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
namespace Zotlabs\Lib;
|
||||
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
/**
|
||||
* @brief A class with chatroom related static methods.
|
||||
*/
|
||||
@@ -91,7 +93,7 @@ class Chatroom {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
build_sync_packet($channel['channel_id'],array('chatroom' => $r));
|
||||
Libsync::build_sync_packet($channel['channel_id'],array('chatroom' => $r));
|
||||
|
||||
q("delete from chatroom where cr_id = %d",
|
||||
intval($r[0]['cr_id'])
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace Zotlabs\Lib;
|
||||
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
define ( 'NWIKI_ITEM_RESOURCE_TYPE', 'nwiki' );
|
||||
|
||||
class NativeWiki {
|
||||
@@ -178,7 +180,7 @@ class NativeWiki {
|
||||
foreach($sync_item as $w) {
|
||||
$pkt[] = encode_item($w,true);
|
||||
}
|
||||
build_sync_packet($uid,array('wiki' => $pkt));
|
||||
Libsync::build_sync_packet($uid,array('wiki' => $pkt));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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))
|
||||
|
||||
@@ -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']));
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)));
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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));
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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));
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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']);
|
||||
}
|
||||
|
||||
@@ -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 ]);
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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']);
|
||||
|
||||
@@ -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 ]);
|
||||
|
||||
@@ -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)
|
||||
]
|
||||
|
||||
@@ -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) ]
|
||||
]
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Zotlabs\Storage;
|
||||
|
||||
use Sabre\DAV;
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
/**
|
||||
* @brief RedDirectory class.
|
||||
@@ -179,7 +180,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo
|
||||
if ($ch) {
|
||||
$sync = attach_export_data($ch, $this->folder_hash);
|
||||
if ($sync)
|
||||
build_sync_packet($ch['channel_id'], array('file' => array($sync)));
|
||||
Libsync::build_sync_packet($ch['channel_id'], array('file' => array($sync)));
|
||||
}
|
||||
|
||||
$this->red_path = $new_path;
|
||||
@@ -368,7 +369,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo
|
||||
$sync = attach_export_data($c[0], $hash);
|
||||
|
||||
if ($sync)
|
||||
build_sync_packet($c[0]['channel_id'], array('file' => array($sync)));
|
||||
Libsync::build_sync_packet($c[0]['channel_id'], array('file' => array($sync)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -401,7 +402,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo
|
||||
logger('createDirectory: attach_export_data returns $sync:' . print_r($sync, true), LOGGER_DEBUG);
|
||||
|
||||
if($sync) {
|
||||
build_sync_packet($r[0]['channel_id'], array('file' => array($sync)));
|
||||
Libsync::build_sync_packet($r[0]['channel_id'], array('file' => array($sync)));
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -432,7 +433,7 @@ class Directory extends DAV\Node implements DAV\ICollection, DAV\IQuota, DAV\IMo
|
||||
if ($ch) {
|
||||
$sync = attach_export_data($ch, $this->folder_hash, true);
|
||||
if ($sync)
|
||||
build_sync_packet($ch['channel_id'], array('file' => array($sync)));
|
||||
Libsync::build_sync_packet($ch['channel_id'], array('file' => array($sync)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
namespace Zotlabs\Storage;
|
||||
|
||||
use Sabre\DAV;
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
/**
|
||||
* @brief This class represents a file in DAV.
|
||||
@@ -106,7 +107,7 @@ class File extends DAV\Node implements DAV\IFile {
|
||||
if($ch) {
|
||||
$sync = attach_export_data($ch,$this->data['hash']);
|
||||
if($sync)
|
||||
build_sync_packet($ch['channel_id'],array('file' => array($sync)));
|
||||
Libsync::build_sync_packet($ch['channel_id'],array('file' => array($sync)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -254,7 +255,7 @@ class File extends DAV\Node implements DAV\IFile {
|
||||
$sync = attach_export_data($c[0],$this->data['hash']);
|
||||
|
||||
if($sync)
|
||||
build_sync_packet($c[0]['channel_id'],array('file' => array($sync)));
|
||||
Libsync::build_sync_packet($c[0]['channel_id'],array('file' => array($sync)));
|
||||
|
||||
}
|
||||
|
||||
@@ -378,7 +379,7 @@ class File extends DAV\Node implements DAV\IFile {
|
||||
if($ch) {
|
||||
$sync = attach_export_data($ch, $this->data['hash'], true);
|
||||
if($sync)
|
||||
build_sync_packet($ch['channel_id'], array('file' => array($sync)));
|
||||
Libsync::build_sync_packet($ch['channel_id'], array('file' => array($sync)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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))));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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))));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
// connect utility
|
||||
|
||||
if(! file_exists('include/cli_startup.php')) {
|
||||
@@ -51,7 +53,7 @@ cli_startup();
|
||||
$abconfig = load_abconfig($c['channel_id'],$clone['abook_xchan']);
|
||||
if($abconfig)
|
||||
$clone['abconfig'] = $abconfig;
|
||||
build_sync_packet($c['channel_id'], array('abook' => array($clone)), true);
|
||||
Libsync::build_sync_packet($c['channel_id'], array('abook' => array($clone)), true);
|
||||
|
||||
$can_view_stream = intval(get_abconfig($c['channel_id'],$clone['abook_xchan'],'their_perms','view_stream'));
|
||||
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
// file import to DAV utility
|
||||
|
||||
if(!file_exists('include/cli_startup.php')) {
|
||||
@@ -52,6 +54,6 @@ if($argc != 2) {
|
||||
|
||||
$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)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use Zotlabs\Lib\Libsync;
|
||||
|
||||
// Red pconfig utility
|
||||
|
||||
|
||||
@@ -63,7 +65,7 @@ if($argc > 2 && strpos($argv[2],'.')) {
|
||||
|
||||
if($argc > 4) {
|
||||
set_pconfig($argv[1],$argv[2],$argv[3],$argv[4]);
|
||||
build_sync_packet($argv[1]);
|
||||
Libsync::build_sync_packet($argv[1]);
|
||||
echo "pconfig[{$argv[1]}][{$argv[2]}][{$argv[3]}] = " . get_pconfig($argv[1],$argv[2],$argv[3]) . "\n";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user