diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-02-06 20:10:10 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-02-06 20:10:10 +0100 |
commit | 70edcabca1e9341b857c469760c88e5c9d318c53 (patch) | |
tree | 6af269b8e2d64e3be5ff6036e38e860e55fe2f33 /Zotlabs | |
parent | dce5e8d0ccc1bb01b7db53af67bd872704a918ed (diff) | |
download | volse-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')
-rw-r--r-- | Zotlabs/Lib/Apps.php | 9 | ||||
-rw-r--r-- | Zotlabs/Module/Apps.php | 2 |
2 files changed, 5 insertions, 6 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) : ''); } } diff --git a/Zotlabs/Module/Apps.php b/Zotlabs/Module/Apps.php index 1ccd792eb..2df6d675f 100644 --- a/Zotlabs/Module/Apps.php +++ b/Zotlabs/Module/Apps.php @@ -38,7 +38,7 @@ class Apps extends \Zotlabs\Web\Controller { foreach($syslist as $app) { $apps[] = Zlib\Apps::app_render($app,$mode); } - + return replace_macros(get_markup_template('myapps.tpl'), array( '$sitename' => get_config('system','sitename'), '$cat' => ((array_key_exists('cat',$_GET) && $_GET['cat']) ? ' - ' . escape_tags($_GET['cat']) : ''), |