aboutsummaryrefslogtreecommitdiffstats
path: root/include/channel.php
diff options
context:
space:
mode:
authorredmatrix <git@macgirvin.com>2016-06-21 18:18:06 -0700
committerredmatrix <git@macgirvin.com>2016-06-21 18:24:36 -0700
commitb593c3a9b90bc35e7bfa320acffb63b9b0f3de93 (patch)
tree3e6d54e3e23b17709c4f5d1c94abccd106cb95ed /include/channel.php
parent63423c8ee1f750d855c75ed67205076d21eda4f1 (diff)
downloadvolse-hubzilla-b593c3a9b90bc35e7bfa320acffb63b9b0f3de93.tar.gz
volse-hubzilla-b593c3a9b90bc35e7bfa320acffb63b9b0f3de93.tar.bz2
volse-hubzilla-b593c3a9b90bc35e7bfa320acffb63b9b0f3de93.zip
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
Diffstat (limited to 'include/channel.php')
-rw-r--r--include/channel.php8
1 files changed, 7 insertions, 1 deletions
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');