diff options
Diffstat (limited to 'include/channel.php')
-rw-r--r-- | include/channel.php | 38 |
1 files changed, 13 insertions, 25 deletions
diff --git a/include/channel.php b/include/channel.php index 087bd4162..913768017 100644 --- a/include/channel.php +++ b/include/channel.php @@ -16,7 +16,7 @@ require_once('include/menu.php'); * @param int $account_id * Account_id used for this request * - * @returns assoziative array with: + * @returns associative array with: * * \e boolean \b success boolean true if creating a new channel is allowed for this account * * \e string \b message (optional) if success is false, optional error text * * \e int \b total_identities @@ -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) @@ -514,7 +516,7 @@ function identity_basic_export($channel_id, $items = false) { for($x = 0; $x < count($ret['abook']); $x ++) { $xchans[] = $ret['abook'][$x]['abook_chan']; - $abconfig = load_abconfig($ret['channel']['channel_hash'],$ret['abook'][$x]['abook_xchan']); + $abconfig = load_abconfig($channel_id,$ret['abook'][$x]['abook_xchan']); if($abconfig) $ret['abook'][$x]['abconfig'] = $abconfig; } @@ -676,14 +678,6 @@ function identity_basic_export($channel_id, $items = false) { $ret['mail'] = $m; } - $r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d", - intval($channel_id) - ); - - if($r) - $ret['item_id'] = $r; - - //$key = get_config('system','prvkey'); /** @warning this may run into memory limits on smaller systems */ @@ -725,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'); @@ -746,17 +744,6 @@ function identity_export_year($channel_id,$year,$month = 0) { $ret['item'][] = encode_item($rr,true); } - $r = q("select item_id.*, item.mid from item_id left join item on item_id.iid = item.id where item_id.uid = %d - and item.created >= '%s' and item.created < '%s' order by created ", - intval($channel_id), - dbesc($mindate), - dbesc($maxdate) - ); - - if($r) - $ret['item_id'] = $r; - - return $ret; } @@ -774,11 +761,10 @@ function identity_export_year($channel_id,$year,$month = 0) { * * The channel default theme is also selected for use, unless over-riden elsewhere. * - * @param[in,out] App &$a * @param string $nickname * @param string $profile */ -function profile_load(&$a, $nickname, $profile = '') { +function profile_load($nickname, $profile = '') { // logger('profile_load: ' . $nickname . (($profile) ? ' profile: ' . $profile : '')); @@ -875,7 +861,7 @@ function profile_load(&$a, $nickname, $profile = '') { ); if($z) { $p[0]['picdate'] = $z[0]['xchan_photo_date']; - $p[0]['reddress'] = str_replace('@','@',$z[0]['xchan_addr']); + $p[0]['reddress'] = str_replace('@','@',$z[0]['xchan_addr']); } // fetch user tags if this isn't the default profile @@ -1046,6 +1032,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'], @@ -1243,6 +1230,7 @@ function advanced_profile(&$a) { $things = get_things(App::$profile['profile_guid'],App::$profile['profile_uid']); + // logger('mod_profile: things: ' . print_r($things,true), LOGGER_DATA); return replace_macros($tpl, array( |