aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Lib/Apps.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Lib/Apps.php')
-rw-r--r--Zotlabs/Lib/Apps.php15
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'];