aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2017-02-06 20:10:10 +0100
committerMario Vavti <mario@mariovavti.com>2017-02-06 20:10:10 +0100
commit70edcabca1e9341b857c469760c88e5c9d318c53 (patch)
tree6af269b8e2d64e3be5ff6036e38e860e55fe2f33 /Zotlabs/Lib
parentdce5e8d0ccc1bb01b7db53af67bd872704a918ed (diff)
downloadvolse-hubzilla-70edcabca1e9341b857c469760c88e5c9d318c53.tar.gz
volse-hubzilla-70edcabca1e9341b857c469760c88e5c9d318c53.tar.bz2
volse-hubzilla-70edcabca1e9341b857c469760c88e5c9d318c53.zip
move icon stuff back to app_render() and send navapps through app_render()
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r--Zotlabs/Lib/Apps.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php
index 7c07f2974..e40c7ef0e 100644
--- a/Zotlabs/Lib/Apps.php
+++ b/Zotlabs/Lib/Apps.php
@@ -26,7 +26,6 @@ class Apps {
foreach($files as $f) {
$x = self::parse_app_description($f,$translate);
if($x) {
- $x['icon'] = ((strpos($x['photo'],'icon:') === 0) ? substr($x['photo'],5) : '');
$ret[] = $x;
}
}
@@ -40,7 +39,6 @@ class Apps {
$x = self::parse_app_description($f,$translate);
if($x) {
$x['plugin'] = $plugin;
- $x['icon'] = ((strpos($x['photo'],'icon:') === 0) ? substr($x['photo'],5) : '');
$ret[] = $x;
}
}
@@ -341,9 +339,11 @@ 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 : ''),
@@ -351,7 +351,8 @@ class Apps {
'$delete' => ((local_channel() && $installed && $mode == 'edit') ? t('Delete') : ''),
'$undelete' => ((local_channel() && $installed && $mode == 'edit') ? t('Undelete') : ''),
'$deleted' => $papp['deleted'],
- '$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true)
+ '$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true),
+ '$navapps' => ((local_channel() && $installed && $mode == 'nav') ? true : false)
));
}
@@ -512,8 +513,6 @@ class Apps {
intval(TERM_OBJ_APP),
intval($r[$x]['id'])
);
-
- $r[$x]['app_icon'] = ((strpos($r[$x]['app_photo'],'icon:') === 0) ? substr($r[$x]['app_photo'],5) : '');
}
}