finish the channel_reddress() conversion
This commit is contained in:
parent
10a52977f8
commit
b5d093e5ca
@ -465,7 +465,7 @@ class Enotify {
|
||||
// use $_SESSION['zid_override'] to force zid() to use
|
||||
// the recipient address instead of the current observer
|
||||
|
||||
$_SESSION['zid_override'] = $recip['channel_address'] . '@' . \App::get_hostname();
|
||||
$_SESSION['zid_override'] = channel_reddress($recip);
|
||||
$_SESSION['zrl_override'] = z_root() . '/channel/' . $recip['channel_address'];
|
||||
|
||||
$textversion = zidify_links($textversion);
|
||||
|
@ -105,7 +105,7 @@ class SuperCurl {
|
||||
$opts['cookie'] = 'PHPSESSID=' . trim(file_get_contents('store/[data]/cookien_' . $this->magicauth));
|
||||
$c = channelx_by_n($this->magicauth);
|
||||
if($c)
|
||||
$url = zid($this->url,$c['channel_address'] . '@' . \App::get_hostname());
|
||||
$url = zid($this->url,channel_reddress($c));
|
||||
}
|
||||
if($this->custom)
|
||||
$opts['custom'] = $this->custom;
|
||||
|
@ -297,7 +297,7 @@ function create_identity($arr) {
|
||||
dbesc($guid),
|
||||
dbesc($sig),
|
||||
dbesc($hash),
|
||||
dbesc($ret['channel']['channel_address'] . '@' . App::get_hostname()),
|
||||
dbesc(channel_reddress($ret['channel'])),
|
||||
intval($primary),
|
||||
dbesc(z_root()),
|
||||
dbesc(base64url_encode(rsa_sign(z_root(),$ret['channel']['channel_prvkey']))),
|
||||
@ -319,7 +319,7 @@ function create_identity($arr) {
|
||||
dbesc(z_root() . "/photo/profile/l/{$newuid}"),
|
||||
dbesc(z_root() . "/photo/profile/m/{$newuid}"),
|
||||
dbesc(z_root() . "/photo/profile/s/{$newuid}"),
|
||||
dbesc($ret['channel']['channel_address'] . '@' . App::get_hostname()),
|
||||
dbesc(channel_reddress($ret['channel'])),
|
||||
dbesc(z_root() . '/channel/' . $ret['channel']['channel_address']),
|
||||
dbesc(z_root() . '/follow?f=&url=%s'),
|
||||
dbesc(z_root() . '/poco/' . $ret['channel']['channel_address']),
|
||||
@ -918,7 +918,7 @@ function profile_load($nickname, $profile = '') {
|
||||
|
||||
App::$profile = $p[0];
|
||||
App::$profile_uid = $p[0]['profile_uid'];
|
||||
App::$page['title'] = App::$profile['channel_name'] . " - " . App::$profile['channel_address'] . "@" . App::get_hostname();
|
||||
App::$page['title'] = App::$profile['channel_name'] . " - " . channel_reddress(App::$profile);
|
||||
|
||||
App::$profile['permission_to_view'] = $can_view_profile;
|
||||
|
||||
@ -1033,7 +1033,7 @@ function profile_sidebar($profile, $block = 0, $show_connect = true, $zcard = fa
|
||||
$connect_url = rconnect_url($profile['uid'],get_observer_hash());
|
||||
$connect = (($connect_url) ? t('Connect') : '');
|
||||
if($connect_url)
|
||||
$connect_url = sprintf($connect_url,urlencode($profile['channel_address'] . '@' . App::get_hostname()));
|
||||
$connect_url = sprintf($connect_url,urlencode(channel_reddress($profile)));
|
||||
|
||||
// premium channel - over-ride
|
||||
|
||||
@ -1779,7 +1779,7 @@ function get_zcard($channel,$observer_hash = '',$args = array()) {
|
||||
// $translate = intval(($scale / 1.0) * 100);
|
||||
|
||||
|
||||
$channel['channel_addr'] = $channel['channel_address'] . '@' . App::get_hostname();
|
||||
$channel['channel_addr'] = channel_reddress($channel);
|
||||
$zcard = array('chan' => $channel);
|
||||
|
||||
$r = q("select height, width, resource_id, imgscale, mimetype from photo where uid = %d and imgscale = %d and photo_usage = %d",
|
||||
@ -1841,7 +1841,7 @@ function get_zcard_embed($channel,$observer_hash = '',$args = array()) {
|
||||
$pphoto = array('mimetype' => $channel['xchan_photo_mimetype'], 'width' => 300 , 'height' => 300, 'href' => $channel['xchan_photo_l']);
|
||||
}
|
||||
|
||||
$channel['channel_addr'] = $channel['channel_address'] . '@' . App::get_hostname();
|
||||
$channel['channel_addr'] = channel_reddress($channel);
|
||||
$zcard = array('chan' => $channel);
|
||||
|
||||
$r = q("select height, width, resource_id, imgscale, mimetype from photo where uid = %d and imgscale = %d and photo_usage = %d",
|
||||
|
@ -423,7 +423,7 @@ function local_dir_update($uid, $force) {
|
||||
$arr = array('channel_id' => $uid, 'hash' => $hash, 'profile' => $profile);
|
||||
call_hooks('local_dir_update', $arr);
|
||||
|
||||
$address = $p[0]['channel_address'] . '@' . App::get_hostname();
|
||||
$address = channel_reddress($p[0]);
|
||||
|
||||
if (perm_is_allowed($uid, '', 'view_profile')) {
|
||||
import_directory_profile($hash, $arr['profile'], $address, 0);
|
||||
@ -439,5 +439,5 @@ function local_dir_update($uid, $force) {
|
||||
}
|
||||
|
||||
$ud_hash = random_string() . '@' . App::get_hostname();
|
||||
update_modtime($hash, $ud_hash, $p[0]['channel_address'] . '@' . App::get_hostname(),(($force) ? UPDATE_FLAGS_FORCED : UPDATE_FLAGS_UPDATED));
|
||||
update_modtime($hash, $ud_hash, channel_reddress($p[0]),(($force) ? UPDATE_FLAGS_FORCED : UPDATE_FLAGS_UPDATED));
|
||||
}
|
||||
|
@ -2262,7 +2262,7 @@ function store_diaspora_comment_sig($datarray, $channel, $parent_item, $post_id,
|
||||
|
||||
logger('storing diaspora comment signature',LOGGER_DEBUG);
|
||||
|
||||
$diaspora_handle = $channel['channel_address'] . '@' . App::get_hostname();
|
||||
$diaspora_handle = channel_reddress($channel);
|
||||
|
||||
$signed_text = $datarray['mid'] . ';' . $parent_item['mid'] . ';' . $signed_body . ';' . $diaspora_handle;
|
||||
|
||||
|
@ -75,7 +75,7 @@ function send_message($uid = 0, $recipient='', $body='', $subject='', $replyto='
|
||||
if($recip)
|
||||
$recip_handle = $recip[0]['xchan_addr'];
|
||||
|
||||
$sender_handle = $channel['channel_address'] . '@' . App::get_hostname();
|
||||
$sender_handle = channel_reddress($channel);
|
||||
|
||||
$handles = $recip_handle . ';' . $sender_handle;
|
||||
|
||||
|
@ -2010,11 +2010,11 @@ function get_site_info() {
|
||||
$admin = array();
|
||||
foreach($r as $rr) {
|
||||
if($rr['channel_pageflags'] & PAGE_HUBADMIN)
|
||||
$admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . App::get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
|
||||
$admin[] = array( 'name' => $rr['channel_name'], 'address' => channel_reddress($rr), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
|
||||
}
|
||||
if(! $admin) {
|
||||
foreach($r as $rr) {
|
||||
$admin[] = array( 'name' => $rr['channel_name'], 'address' => $rr['channel_address'] . '@' . App::get_hostname(), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
|
||||
$admin[] = array( 'name' => $rr['channel_name'], 'address' => channel_reddress($rr), 'channel' => z_root() . '/channel/' . $rr['channel_address']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -265,7 +265,7 @@ function change_channel($change_channel) {
|
||||
);
|
||||
if($x) {
|
||||
$_SESSION['my_url'] = $x[0]['xchan_url'];
|
||||
$_SESSION['my_address'] = $r[0]['channel_address'] . '@' . App::get_hostname();
|
||||
$_SESSION['my_address'] = channel_reddress($r[0]);
|
||||
|
||||
App::set_observer($x[0]);
|
||||
App::set_perms(get_all_perms(local_channel(), $hash));
|
||||
|
@ -1593,7 +1593,7 @@ function process_delivery($sender, $arr, $deliveries, $relay, $public = false, $
|
||||
}
|
||||
|
||||
$channel = $r[0];
|
||||
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . App::get_hostname() . '>');
|
||||
$DR->addto_recipient($channel['channel_name'] . ' <' . channel_reddress($channel) . '>');
|
||||
|
||||
/* blacklisted channels get a permission denied, no special message to tip them off */
|
||||
|
||||
@ -2082,7 +2082,7 @@ function process_mail_delivery($sender, $arr, $deliveries) {
|
||||
}
|
||||
|
||||
$channel = $r[0];
|
||||
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . App::get_hostname() . '>');
|
||||
$DR->addto_recipient($channel['channel_name'] . ' <' . channel_reddress($channel) . '>');
|
||||
|
||||
/* blacklisted channels get a permission denied, no special message to tip them off */
|
||||
|
||||
@ -3532,7 +3532,7 @@ function process_channel_sync_delivery($sender, $arr, $deliveries) {
|
||||
|
||||
if(array_key_exists('item',$arr) && is_array($arr['item'][0])) {
|
||||
$DR = new Zotlabs\Zot\DReport(z_root(),$d['hash'],$d['hash'],$arr['item'][0]['message_id'],'channel sync processed');
|
||||
$DR->addto_recipient($channel['channel_name'] . ' <' . $channel['channel_address'] . '@' . App::get_hostname() . '>');
|
||||
$DR->addto_recipient($channel['channel_name'] . ' <' . channel_reddress($channel) . '>');
|
||||
}
|
||||
else
|
||||
$DR = new Zotlabs\Zot\DReport(z_root(),$d['hash'],$d['hash'],'sync packet','channel sync delivered');
|
||||
@ -4032,7 +4032,7 @@ function check_zotinfo($channel,$locations,&$ret) {
|
||||
dbesc($channel['channel_guid']),
|
||||
dbesc($channel['channel_guid_sig']),
|
||||
dbesc($channel['channel_hash']),
|
||||
dbesc($channel['channel_address'] . '@' . App::get_hostname()),
|
||||
dbesc(channel_reddress($channel)),
|
||||
intval(1),
|
||||
dbesc(z_root()),
|
||||
dbesc(base64url_encode(rsa_sign(z_root(),$channel['channel_prvkey']))),
|
||||
|
Reference in New Issue
Block a user