aboutsummaryrefslogtreecommitdiffstats
path: root/include/apps.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-10-21 15:00:41 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-10-21 15:00:41 -0700
commitb7538b6ada4df7ace6f27bc6349b63ca7f8651e8 (patch)
tree02d42222dd4fafc3ae5de3f5e268a2213a48f487 /include/apps.php
parentb57e73519975b8d9cc5887c2e35cb36dda6463dc (diff)
downloadvolse-hubzilla-b7538b6ada4df7ace6f27bc6349b63ca7f8651e8.tar.gz
volse-hubzilla-b7538b6ada4df7ace6f27bc6349b63ca7f8651e8.tar.bz2
volse-hubzilla-b7538b6ada4df7ace6f27bc6349b63ca7f8651e8.zip
turn relative links in app_render() into absolute links, without affecting the install.
Diffstat (limited to 'include/apps.php')
-rw-r--r--include/apps.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/apps.php b/include/apps.php
index c036867b1..0a62dc5a8 100644
--- a/include/apps.php
+++ b/include/apps.php
@@ -176,14 +176,19 @@ function app_render($papp,$mode = 'view') {
$installed = false;
- if(! $papp['photo'])
- $papp['photo'] = z_root() . '/' . get_default_profile_photo(80);
-
if(! $papp)
return;
+ if(! $papp['photo'])
+ $papp['photo'] = z_root() . '/' . get_default_profile_photo(80);
+
+
+
$papp['papp'] = papp_encode($papp);
+ if(! strstr($papp['url'],'://'))
+ $papp['url'] = z_root() . ((strpos($papp['url'],'/') === 0) ? '' : '/') . $papp['url'];
+
foreach($papp as $k => $v) {
if(strpos($v,'http') === 0 && $k != 'papp')
$papp[$k] = zid($v);