aboutsummaryrefslogtreecommitdiffstats
path: root/mod/chanview.php
diff options
context:
space:
mode:
authorThomas Willingham <beardyunixer@beardyunixer.com>2014-09-02 01:58:53 +0100
committerThomas Willingham <beardyunixer@beardyunixer.com>2014-09-02 01:58:53 +0100
commit393b3bb213ad086f0628418d1511231bedbc370e (patch)
treeb7c0ba5a7de430dedd3e1166a278ae5b2c7b934b /mod/chanview.php
parent1c0be3994382ca355db16a2ab9f54dd99a37f1ec (diff)
downloadvolse-hubzilla-393b3bb213ad086f0628418d1511231bedbc370e.tar.gz
volse-hubzilla-393b3bb213ad086f0628418d1511231bedbc370e.tar.bz2
volse-hubzilla-393b3bb213ad086f0628418d1511231bedbc370e.zip
If you have a new channel (or a new hub searching for an old channel)
which uses an xchan_url other than channel or profile, chanview will fail to find $a->poi and fail as there is no way to import the xchan. Instead of giving up and presenting an error, we'll send you to the requested URL anyway. If we send you with a Zid, there's a good chance you'll authenticate because xchans are like glitter - once you've got one, they get everywhere, and there's a good chance you'll know *somebody* at the hub. .
Diffstat (limited to 'mod/chanview.php')
-rw-r--r--mod/chanview.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/mod/chanview.php b/mod/chanview.php
index 449a98bb1..3bf0f3268 100644
--- a/mod/chanview.php
+++ b/mod/chanview.php
@@ -74,15 +74,19 @@ function chanview_content(&$a) {
}
if(! $a->poi) {
- notice( t('Channel not found.') . EOL);
- return;
+// We don't know who this is, and we can't figure it out from the URL
+// On the plus side, there's a good chance we know somebody else at that
+// hub so sending them there with a Zid will probably work anyway.
+ $url = ($_REQUEST['url']);
+ if($observer)
+ $url = zid($url);
}
-
+ if ($a->poi) {
$url = $a->poi['xchan_url'];
if($observer)
$url = zid($url);
-
+ }
// let somebody over-ride the iframed viewport presentation
// or let's just declare this a failed experiment.
@@ -97,4 +101,4 @@ function chanview_content(&$a) {
// return $o;
-} \ No newline at end of file
+}