From b593c3a9b90bc35e7bfa320acffb63b9b0f3de93 Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 21 Jun 2016 18:18:06 -0700 Subject: 1. provide automatic relocation of important links in items that are imported or synced to clones 2. provide framework for custom curl request bodies using custom/non-standard request methods. This was a real nightmare because curl doesn't actually let you specify a string to send as the request body (except when doing POST). You have to treat it as a file upload using a custom file handler function which provides the actual content in chunks as if it were buffered I/O. 3. item_store and item_store_update now return the item that was stored --- include/channel.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index 90dfb2bf6..fdb6788be 100644 --- a/include/channel.php +++ b/include/channel.php @@ -496,8 +496,10 @@ function identity_basic_export($channel_id, $items = false) { $r = q("select * from channel where channel_id = %d limit 1", intval($channel_id) ); - if($r) + if($r) { $ret['channel'] = $r[0]; + $ret['relocate'] = [ 'channel_address' => $r[0]['channel_address'], 'url' => z_root()]; + } $r = q("select * from profile where uid = %d", intval($channel_id) @@ -717,6 +719,10 @@ function identity_export_year($channel_id,$year,$month = 0) { $ret = array(); + $ch = channelx_by_n($channel_id); + if($ch) { + $ret['relocate'] = [ 'channel_address' => $ch['channel_address'], 'url' => z_root()]; + } $mindate = datetime_convert('UTC','UTC',$year . '-' . $target_month . '-01 00:00:00'); if($month && $month < 12) $maxdate = datetime_convert('UTC','UTC',$year . '-' . $target_month_plus . '-01 00:00:00'); -- cgit v1.2.3 From 2a840460dddb06c99b616b5adc666ee0f39588de Mon Sep 17 00:00:00 2001 From: redmatrix Date: Tue, 21 Jun 2016 19:25:14 -0700 Subject: vcard spec changes --- include/channel.php | 1 + 1 file changed, 1 insertion(+) (limited to 'include/channel.php') diff --git a/include/channel.php b/include/channel.php index fdb6788be..562aedddc 100644 --- a/include/channel.php +++ b/include/channel.php @@ -1033,6 +1033,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa $diaspora = array( 'podloc' => z_root(), + 'guid' => $profile['channel_guid'] . str_replace('.','',App::get_hostname()), 'searchable' => (($block) ? 'false' : 'true'), 'nickname' => $profile['channel_address'], 'fullname' => $profile['channel_name'], -- cgit v1.2.3