aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2014-06-10 16:40:55 -0700
committerfriendica <info@friendica.com>2014-06-10 16:40:55 -0700
commitadbcf371f9c282db4d0a1c936d8866f24c060e5c (patch)
tree27b4ff22a166671de204f1d2c97401cba0b0b223 /include
parent40c03c642ed0072e0f6e164fc4ca6014ecec4ed8 (diff)
downloadvolse-hubzilla-adbcf371f9c282db4d0a1c936d8866f24c060e5c.tar.gz
volse-hubzilla-adbcf371f9c282db4d0a1c936d8866f24c060e5c.tar.bz2
volse-hubzilla-adbcf371f9c282db4d0a1c936d8866f24c060e5c.zip
should really wait until after the first cuppa
Diffstat (limited to 'include')
-rw-r--r--include/apps.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/apps.php b/include/apps.php
index 40fa42576..31f93e25a 100644
--- a/include/apps.php
+++ b/include/apps.php
@@ -208,9 +208,10 @@ function app_render($papp,$mode = 'view') {
$hosturl = z_root() . '/';
}
elseif(remote_user()) {
- $channel = get_app()->get_channel();
- if($channel) {
- $x = parse_url($channel['xchan_connurl']);
+ $observer = get_app()->get_get_observer();
+ if($observer && $observer['xchan_network'] === 'zot') {
+ // some folks might have xchan_url redirected offsite, use the connurl
+ $x = parse_url($observer['xchan_connurl']);
if($x) {
$hosturl = $x['scheme'] . '://' . $x['host'] . '/';
}
@@ -223,7 +224,7 @@ function app_render($papp,$mode = 'view') {
'$app' => $papp,
'$hosturl' => $hosturl,
'$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''),
- '$install' => (((local_user() || $hosturl) && $mode == 'view') ? $install_action : ''),
+ '$install' => (($hosturl && $mode == 'view') ? $install_action : ''),
'$edit' => ((local_user() && $installed && $mode == 'edit') ? t('Edit') : ''),
'$delete' => ((local_user() && $installed && $mode == 'edit') ? t('Delete') : '')
));