should really wait until after the first cuppa
This commit is contained in:
parent
40c03c642e
commit
adbcf371f9
@ -208,9 +208,10 @@ function app_render($papp,$mode = 'view') {
|
|||||||
$hosturl = z_root() . '/';
|
$hosturl = z_root() . '/';
|
||||||
}
|
}
|
||||||
elseif(remote_user()) {
|
elseif(remote_user()) {
|
||||||
$channel = get_app()->get_channel();
|
$observer = get_app()->get_get_observer();
|
||||||
if($channel) {
|
if($observer && $observer['xchan_network'] === 'zot') {
|
||||||
$x = parse_url($channel['xchan_connurl']);
|
// some folks might have xchan_url redirected offsite, use the connurl
|
||||||
|
$x = parse_url($observer['xchan_connurl']);
|
||||||
if($x) {
|
if($x) {
|
||||||
$hosturl = $x['scheme'] . '://' . $x['host'] . '/';
|
$hosturl = $x['scheme'] . '://' . $x['host'] . '/';
|
||||||
}
|
}
|
||||||
@ -223,7 +224,7 @@ function app_render($papp,$mode = 'view') {
|
|||||||
'$app' => $papp,
|
'$app' => $papp,
|
||||||
'$hosturl' => $hosturl,
|
'$hosturl' => $hosturl,
|
||||||
'$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''),
|
'$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') : ''),
|
'$edit' => ((local_user() && $installed && $mode == 'edit') ? t('Edit') : ''),
|
||||||
'$delete' => ((local_user() && $installed && $mode == 'edit') ? t('Delete') : '')
|
'$delete' => ((local_user() && $installed && $mode == 'edit') ? t('Delete') : '')
|
||||||
));
|
));
|
||||||
|
Reference in New Issue
Block a user