diff options
author | Mario Vavti <mario@mariovavti.com> | 2017-02-08 11:17:09 +0100 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-02-08 11:17:09 +0100 |
commit | eb415fd869b03724b7308320b45b1bdfae6e5142 (patch) | |
tree | 83f26b654fe9b54391bbd202555048a432de14f8 | |
parent | ace0a1cb754422da929784b9bd24b4c106d2a66e (diff) | |
download | volse-hubzilla-eb415fd869b03724b7308320b45b1bdfae6e5142.tar.gz volse-hubzilla-eb415fd869b03724b7308320b45b1bdfae6e5142.tar.bz2 volse-hubzilla-eb415fd869b03724b7308320b45b1bdfae6e5142.zip |
better detection of when to show the feature button and document nav mode for app_render()
-rw-r--r-- | Zotlabs/Lib/Apps.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 0297c3e14..1432cbdcf 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -262,6 +262,7 @@ class Apps { * list: normal mode for viewing an app on the app page * no buttons are shown * edit: viewing the app page in editing mode provides a delete button + * nav: render apps for app-bin */ $installed = false; @@ -357,7 +358,7 @@ class Apps { '$delete' => ((local_channel() && $installed && $mode == 'edit') ? t('Delete') : ''), '$undelete' => ((local_channel() && $installed && $mode == 'edit') ? t('Undelete') : ''), '$deleted' => $papp['deleted'], - '$feature' => ((array_key_exists('categories',$papp)) ? true : false), + '$feature' => (($papp['embed']) ? false : true), '$featured' => ((strpos($papp['categories'], 'nav_featured_app') === false) ? false : true), '$navapps' => (($mode == 'nav') ? true : false) )); @@ -769,6 +770,8 @@ class Apps { if(! $embed) return $ret; + $ret['embed'] = true; + if(array_key_exists('categories',$ret)) unset($ret['categories']); |