From dce9a70ff59658249abeb58af46144eea16c721b Mon Sep 17 00:00:00 2001 From: Mario Vavti Date: Fri, 3 Feb 2017 12:12:05 +0100 Subject: check for app-icons in app_list() instead of app_render() --- Zotlabs/Lib/Apps.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'Zotlabs/Lib/Apps.php') diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 595cf33ee..c8345e351 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -339,12 +339,9 @@ 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 : ''), @@ -512,8 +509,11 @@ 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) : ''); } } + return($r); } @@ -719,6 +719,9 @@ class Apps { if($app['app_photo']) $ret['photo'] = $app['app_photo']; + if($app['app_icon']) + $ret['icon'] = $app['app_icon']; + if($app['app_version']) $ret['version'] = $app['app_version']; -- cgit v1.2.3