diff options
author | friendica <info@friendica.com> | 2013-01-18 19:54:37 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2013-01-18 19:54:37 -0800 |
commit | b274422867a11f14a1a2bfcf57b1de4961361e15 (patch) | |
tree | ead8601a3b2bcd4799ec09c95f1c36059b0f7307 | |
parent | 27ada18dc5c13591d918cf1bb9132a039f6fb751 (diff) | |
download | volse-hubzilla-b274422867a11f14a1a2bfcf57b1de4961361e15.tar.gz volse-hubzilla-b274422867a11f14a1a2bfcf57b1de4961361e15.tar.bz2 volse-hubzilla-b274422867a11f14a1a2bfcf57b1de4961361e15.zip |
if chanview is provided a url - always load it even if there's no xchan available on this site.
-rw-r--r-- | mod/chanview.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/mod/chanview.php b/mod/chanview.php index b2a8e12d2..a9f3969d1 100644 --- a/mod/chanview.php +++ b/mod/chanview.php @@ -26,7 +26,7 @@ function chanview_content(&$a) { dbesc($_REQUEST['url']) ); if(! $r) - $r = array(array('xchan_url' => $_REQUEST['url'])); + $xchan = array(array('xchan_url' => $_REQUEST['url'])); } if($r) { $xchan = $r[0]; @@ -39,10 +39,15 @@ function chanview_content(&$a) { return; } + $observer = get_observer(); + + $url = (($observer) + ? z_root() . '/magic?f=&dest=' . $xchan['xchan_url'] . '&addr=' . $xchan['xchan_addr'] + : $xchan['xchan_url'] + ); + $o = replace_macros(get_markup_template('chanview.tpl'),array( - '$url' => $xchan['xchan_url'] -// FIXME when magic auth is finished replace here and check that against the chanview page when unauthenticated any place -// '$url' => z_root() . '/magic?f=&dest=' . $xchan['xchan_url'] . '&addr=' . $xchan['xchan_addr'] + '$url' => $url )); return $o; |