aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module/Apps.php
diff options
context:
space:
mode:
Diffstat (limited to 'Zotlabs/Module/Apps.php')
-rw-r--r--Zotlabs/Module/Apps.php8
1 files changed, 5 insertions, 3 deletions
diff --git a/Zotlabs/Module/Apps.php b/Zotlabs/Module/Apps.php
index c672ea467..78c8d99ae 100644
--- a/Zotlabs/Module/Apps.php
+++ b/Zotlabs/Module/Apps.php
@@ -15,6 +15,8 @@ class Apps extends \Zotlabs\Web\Controller {
else
$mode = 'list';
+ $available = ((argc() == 2 && argv(1) === 'available') ? true : false);
+
$_SESSION['return_url'] = \App::$query_string;
$apps = array();
@@ -23,7 +25,7 @@ class Apps extends \Zotlabs\Web\Controller {
Zlib\Apps::import_system_apps();
$syslist = array();
$cat = ((array_key_exists('cat',$_GET) && $_GET['cat']) ? [ escape_tags($_GET['cat']) ] : '');
- $list = Zlib\Apps::app_list(local_channel(), (($mode == 'edit') ? true : false), $cat);
+ $list = Zlib\Apps::app_list((($available) ? 0 : local_channel()), (($mode == 'edit') ? true : false), $cat);
if($list) {
foreach($list as $x) {
$syslist[] = Zlib\Apps::app_encode($x);
@@ -39,7 +41,7 @@ class Apps extends \Zotlabs\Web\Controller {
// logger('apps: ' . print_r($syslist,true));
foreach($syslist as $app) {
- $apps[] = Zlib\Apps::app_render($app,$mode);
+ $apps[] = Zlib\Apps::app_render($app,(($available) ? 'install' : $mode));
}
return replace_macros(get_markup_template('myapps.tpl'), array(
@@ -48,7 +50,7 @@ class Apps extends \Zotlabs\Web\Controller {
'$title' => t('Apps'),
'$apps' => $apps,
'$authed' => ((local_channel()) ? true : false),
- '$manage' => t('Manage apps'),
+ '$manage' => (($available) ? '' : t('Manage apps')),
'$create' => (($mode == 'edit') ? t('Create new app') : '')
));