diff options
author | zotlabs <mike@macgirvin.com> | 2017-02-06 11:14:59 -0800 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2017-02-06 11:14:59 -0800 |
commit | 00cfc4be44fdb5c3d6d9a7f78d4a1726708bdc6e (patch) | |
tree | d606191564f7852ba0cb72c5ead664257b9fbe06 /Zotlabs/Lib | |
parent | d8472cc9f52638dd64eafc731c3009af4b918451 (diff) | |
parent | 70edcabca1e9341b857c469760c88e5c9d318c53 (diff) | |
download | volse-hubzilla-00cfc4be44fdb5c3d6d9a7f78d4a1726708bdc6e.tar.gz volse-hubzilla-00cfc4be44fdb5c3d6d9a7f78d4a1726708bdc6e.tar.bz2 volse-hubzilla-00cfc4be44fdb5c3d6d9a7f78d4a1726708bdc6e.zip |
Merge branch 'dev' of https://github.com/redmatrix/hubzilla into dev_merge
Diffstat (limited to 'Zotlabs/Lib')
-rw-r--r-- | Zotlabs/Lib/Apps.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/Zotlabs/Lib/Apps.php b/Zotlabs/Lib/Apps.php index 595cf33ee..e40c7ef0e 100644 --- a/Zotlabs/Lib/Apps.php +++ b/Zotlabs/Lib/Apps.php @@ -339,8 +339,7 @@ class Apps { } $install_action = (($installed) ? t('Update') : t('Install')); - $icon = ((strpos($papp['photo'],'icon:') === 0) ? substr($papp['photo'],5) : ''); - + $icon = ((strpos($papp['photo'],'icon:') === 0) ? substr($papp['photo'],5) : ''); return replace_macros(get_markup_template('app.tpl'),array( '$app' => $papp, @@ -352,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) )); } @@ -451,13 +451,13 @@ class Apps { intval($uid) ); - $x = q("select * from term where otype = %d and oid = %d limit 1", + $x = q("select * from term where otype = %d and oid = %d and term = 'nav_featured_app' limit 1", intval(TERM_OBJ_APP), intval($r[0]['id']) ); if($x) { - q("delete from term where otype = %d and oid = %d", + q("delete from term where otype = %d and oid = %d and term = 'nav_featured_app'", intval(TERM_OBJ_APP), intval($x[0]['oid']) ); @@ -504,6 +504,7 @@ class Apps { $r = q("select * from app where app_channel = %d $sql_extra order by app_name asc", intval($uid) ); + if($r) { for($x = 0; $x < count($r); $x ++) { if(! $r[$x]['app_system']) @@ -514,6 +515,7 @@ class Apps { ); } } + return($r); } @@ -719,6 +721,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']; |