aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorHubzilla <hubzilla@hz.macgirvin.com>2017-01-22 15:17:37 -0800
committerHubzilla <hubzilla@hz.macgirvin.com>2017-01-22 15:17:37 -0800
commit1627297143b022e8418feb63cc34e1eba1ecb0cd (patch)
tree5177578143453188a4212bfd58f7ce6d38cda947 /Zotlabs
parent951376852c1d39ece5f4e93bb38d2a6de08b66cb (diff)
downloadvolse-hubzilla-1627297143b022e8418feb63cc34e1eba1ecb0cd.tar.gz
volse-hubzilla-1627297143b022e8418feb63cc34e1eba1ecb0cd.tar.bz2
volse-hubzilla-1627297143b022e8418feb63cc34e1eba1ecb0cd.zip
use icons for app photos.
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Apps.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 358ae409b..65f5b3556 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -337,9 +337,12 @@ class Apps {
}
$install_action = (($installed) ? t('Update') : t('Install'));
+ $icon = ((strpos($papp['photo'],'icon:') === 0) ? substr($papp['photo'],5) : '');
+
return replace_macros(get_markup_template('app.tpl'),array(
'$app' => $papp,
+ '$icon' => $icon,
'$hosturl' => $hosturl,
'$purchase' => (($papp['page'] && (! $installed)) ? t('Purchase') : ''),
'$install' => (($hosturl && $mode == 'view') ? $install_action : ''),
@@ -514,7 +517,7 @@ class Apps {
if((! $darray['app_url']) || (! $darray['app_channel']))
return $ret;
- if($arr['photo'] && ! strstr($arr['photo'],z_root())) {
+ if($arr['photo'] && (strpos($arr['photo'],'icon:') !== 0) && (! strstr($arr['photo'],z_root()))) {
$x = import_xchan_photo($arr['photo'],get_observer_hash(),true);
$arr['photo'] = $x[1];
}
@@ -594,7 +597,7 @@ class Apps {
if((! $darray['app_url']) || (! $darray['app_channel']) || (! $darray['app_id']))
return $ret;
- if($arr['photo'] && ! strstr($arr['photo'],z_root())) {
+ if($arr['photo'] && (strpos($arr['photo'],'icon:') !== 0) && (! strstr($arr['photo'],z_root()))) {
$x = import_xchan_photo($arr['photo'],get_observer_hash(),true);
$arr['photo'] = $x[1];
}