aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Lib/Apps.php15
-rw-r--r--Zotlabs/Module/Apps.php2
2 files changed, 11 insertions, 6 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'];
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']) : ''),