aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Connect.php4
-rw-r--r--Zotlabs/Module/Fhublocs.php4
-rw-r--r--Zotlabs/Module/Import.php4
-rw-r--r--Zotlabs/Module/Magic.php2
-rw-r--r--Zotlabs/Module/Xrd.php2
5 files changed, 8 insertions, 8 deletions
diff --git a/Zotlabs/Module/Connect.php b/Zotlabs/Module/Connect.php
index 962c05cce..dec375104 100644
--- a/Zotlabs/Module/Connect.php
+++ b/Zotlabs/Module/Connect.php
@@ -60,13 +60,13 @@ class Connect extends \Zotlabs\Web\Controller {
$observer = \App::get_observer();
if(($observer) && ($_POST['submit'] === t('Continue'))) {
if($observer['xchan_follow'])
- $url = sprintf($observer['xchan_follow'],urlencode(\App::$data['channel']['channel_address'] . '@' . \App::get_hostname()));
+ $url = sprintf($observer['xchan_follow'],urlencode(channel_reddress(\App::$data['channel'])));
if(! $url) {
$r = q("select * from hubloc where hubloc_hash = '%s' order by hubloc_id desc limit 1",
dbesc($observer['xchan_hash'])
);
if($r)
- $url = $r[0]['hubloc_url'] . '/follow?f=&url=' . urlencode(\App::$data['channel']['channel_address'] . '@' . \App::get_hostname());
+ $url = $r[0]['hubloc_url'] . '/follow?f=&url=' . urlencode(channel_reddress(\App::$data['channel']));
}
}
if($url)
diff --git a/Zotlabs/Module/Fhublocs.php b/Zotlabs/Module/Fhublocs.php
index f5b439421..cdf323a41 100644
--- a/Zotlabs/Module/Fhublocs.php
+++ b/Zotlabs/Module/Fhublocs.php
@@ -42,7 +42,7 @@ class Fhublocs extends \Zotlabs\Web\Controller {
if($y)
$primary_address = $y[0]['xchan_addr'];
- $hub_address = $rr['channel']['channel_address'] . '@' . \App::get_hostname();
+ $hub_address = channel_reddress($rr['channel']);
$primary = (($hub_address === $primary_address) ? 1 : 0);
@@ -61,7 +61,7 @@ class Fhublocs extends \Zotlabs\Web\Controller {
dbesc($rr['channel_guid']),
dbesc($rr['channel_guid_sig']),
dbesc($rr['channel_hash']),
- dbesc($rr['channel_address'] . '@' . \App::get_hostname()),
+ dbesc(channel_reddress($rr)),
intval($primary),
dbesc(z_root()),
dbesc(base64url_encode(rsa_sign(z_root(),$rr['channel_prvkey']))),
diff --git a/Zotlabs/Module/Import.php b/Zotlabs/Module/Import.php
index d27f013b9..9574de07c 100644
--- a/Zotlabs/Module/Import.php
+++ b/Zotlabs/Module/Import.php
@@ -209,7 +209,7 @@ class Import extends \Zotlabs\Web\Controller {
dbesc($channel['channel_guid']),
dbesc($channel['channel_guid_sig']),
dbesc($channel['channel_hash']),
- dbesc($channel['channel_address'] . '@' . \App::get_hostname()),
+ dbesc(channel_reddress($channel)),
dbesc('zot'),
intval(($seize) ? 1 : 0),
dbesc(z_root()),
@@ -252,7 +252,7 @@ class Import extends \Zotlabs\Web\Controller {
dbesc(z_root() . "/photo/profile/l/" . $channel['channel_id']),
dbesc(z_root() . "/photo/profile/m/" . $channel['channel_id']),
dbesc(z_root() . "/photo/profile/s/" . $channel['channel_id']),
- dbesc($channel['channel_address'] . '@' . \App::get_hostname()),
+ dbesc(channel_reddress($channel)),
dbesc(z_root() . '/channel/' . $channel['channel_address']),
dbesc(z_root() . '/follow?f=&url=%s'),
dbesc(z_root() . '/poco/' . $channel['channel_address']),
diff --git a/Zotlabs/Module/Magic.php b/Zotlabs/Module/Magic.php
index 6798f72a9..9ee5f9324 100644
--- a/Zotlabs/Module/Magic.php
+++ b/Zotlabs/Module/Magic.php
@@ -140,7 +140,7 @@ class Magic extends \Zotlabs\Web\Controller {
\Zotlabs\Zot\Verify::create('auth',$channel['channel_id'],$token,$x[0]['hubloc_url']);
- $target_url = $x[0]['hubloc_callback'] . '/?f=&auth=' . urlencode($channel['channel_address'] . '@' . \App::get_hostname())
+ $target_url = $x[0]['hubloc_callback'] . '/?f=&auth=' . urlencode(channel_reddress($channel))
. '&sec=' . $token . '&dest=' . urlencode($dest) . '&version=' . ZOT_REVISION;
if($delegate)
diff --git a/Zotlabs/Module/Xrd.php b/Zotlabs/Module/Xrd.php
index d71fae695..3ed19962b 100644
--- a/Zotlabs/Module/Xrd.php
+++ b/Zotlabs/Module/Xrd.php
@@ -43,7 +43,7 @@ class Xrd extends \Zotlabs\Web\Controller {
header("Content-type: application/xrd+xml");
- $aliases = array('acct:' . $r[0]['channel_address'] . '@' . \App::get_hostname(), z_root() . '/channel/' . $r[0]['channel_address'], z_root() . '/~' . $r[0]['channel_address']);
+ $aliases = array('acct:' . channel_reddress($r[0]), z_root() . '/channel/' . $r[0]['channel_address'], z_root() . '/~' . $r[0]['channel_address']);
for($x = 0; $x < count($aliases); $x ++) {
if($aliases[$x] === $resource)