From f6e8ce5516eeaf2e0525f69099d68a55df9501e3 Mon Sep 17 00:00:00 2001 From: zotlabs Date: Wed, 4 Jul 2018 23:20:35 -0700 Subject: appstore changes --- Zotlabs/Module/Apps.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module/Apps.php') diff --git a/Zotlabs/Module/Apps.php b/Zotlabs/Module/Apps.php index c672ea467..10f40af71 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( -- cgit v1.2.3