diff options
author | Hubzilla <hubzilla@hz.macgirvin.com> | 2017-01-22 18:48:45 -0800 |
---|---|---|
committer | Hubzilla <hubzilla@hz.macgirvin.com> | 2017-01-22 18:48:45 -0800 |
commit | 17f1d39fcf973ac35f14a36faa2b92867fbb11e9 (patch) | |
tree | 43ba2ffbfbeb0b056625aabc4aeb42707747d693 /Zotlabs/Lib/NativeWiki.php | |
parent | 3bafa05ad1093d70c893d0985788203ccb1e7169 (diff) | |
download | volse-hubzilla-17f1d39fcf973ac35f14a36faa2b92867fbb11e9.tar.gz volse-hubzilla-17f1d39fcf973ac35f14a36faa2b92867fbb11e9.tar.bz2 volse-hubzilla-17f1d39fcf973ac35f14a36faa2b92867fbb11e9.zip |
basic support for clone syncing of wikis and wiki pages
Diffstat (limited to 'Zotlabs/Lib/NativeWiki.php')
-rw-r--r-- | Zotlabs/Lib/NativeWiki.php | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Zotlabs/Lib/NativeWiki.php b/Zotlabs/Lib/NativeWiki.php index c3380939a..f4089d8a2 100644 --- a/Zotlabs/Lib/NativeWiki.php +++ b/Zotlabs/Lib/NativeWiki.php @@ -93,13 +93,25 @@ class NativeWiki { if($item_id) { \Zotlabs\Daemon\Master::Summon(array('Notifier', 'activity', $item_id)); - return array('item' => $post['item'], 'success' => true); + return array('item' => $post['item'], 'item_id' => $item_id, 'success' => true); } else { return array('item' => null, 'success' => false); } } + static public function sync_a_wiki_item($uid,$id) { + $r = q("select * from item where id = %d and uid = %d", + intval($id), + intval($uid) + ); + if($r) { + xchan_query($r); + $sync_item = fetch_post_tags($r); + build_sync_packet($uid,array('wiki' => array(encode_item($sync_item[0],true)))); + } + } + function delete_wiki($channel_id,$observer_hash,$resource_id) { $w = self::get_wiki($channel_id,$observer_hash,$resource_id); @@ -113,7 +125,7 @@ class NativeWiki { info( t('Wiki files deleted successfully')); - return array('item' => $item, 'success' => (($drop === 1) ? true : false)); + return array('item' => $item, 'item_id' => $item['id'], 'success' => (($drop === 1) ? true : false)); } |