aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Module
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2018-12-14 10:28:55 +0100
committerMario Vavti <mario@mariovavti.com>2018-12-14 10:28:55 +0100
commitc771d2809fe3ff08e40854f4fe57b19e3440247e (patch)
tree1241d2178cdd2801be485e9f25d710eccf76e2c7 /Zotlabs/Module
parent6bea3d6bfc984e6f30867f00be5a92b5cd5be925 (diff)
parent6464099364f3d4e800137a57d3b9ff9e8f7601e4 (diff)
downloadvolse-hubzilla-c771d2809fe3ff08e40854f4fe57b19e3440247e.tar.gz
volse-hubzilla-c771d2809fe3ff08e40854f4fe57b19e3440247e.tar.bz2
volse-hubzilla-c771d2809fe3ff08e40854f4fe57b19e3440247e.zip
Merge remote-tracking branch 'mike/master' into dev
Diffstat (limited to 'Zotlabs/Module')
-rw-r--r--Zotlabs/Module/Appman.php6
-rw-r--r--Zotlabs/Module/Apporder.php33
2 files changed, 21 insertions, 18 deletions
diff --git a/Zotlabs/Module/Appman.php b/Zotlabs/Module/Appman.php
index f50dcc2ab..39689665e 100644
--- a/Zotlabs/Module/Appman.php
+++ b/Zotlabs/Module/Appman.php
@@ -90,12 +90,12 @@ class Appman extends \Zotlabs\Web\Controller {
$channel = \App::get_channel();
- if(argc() > 2) {
+ if(argc() > 3) {
if(argv(2) === 'moveup') {
- Zlib\Apps::moveup(local_channel(),argv(1));
+ Zlib\Apps::moveup(local_channel(),argv(1),argv(3));
}
if(argv(2) === 'movedown') {
- Zlib\Apps::movedown(local_channel(),argv(1));
+ Zlib\Apps::movedown(local_channel(),argv(1),argv(3));
}
goaway(z_root() . '/apporder');
}
diff --git a/Zotlabs/Module/Apporder.php b/Zotlabs/Module/Apporder.php
index a9f66ba69..eac1abc2d 100644
--- a/Zotlabs/Module/Apporder.php
+++ b/Zotlabs/Module/Apporder.php
@@ -17,25 +17,28 @@ class Apporder extends \Zotlabs\Web\Controller {
nav_set_selected('Order Apps');
- $syslist = array();
- $list = Zlib\Apps::app_list(local_channel(), false, ['nav_featured_app', 'nav_pinned_app']);
- if($list) {
- foreach($list as $li) {
- $syslist[] = Zlib\Apps::app_encode($li);
+ foreach( [ 'nav_featured_app', 'nav_pinned_app' ] as $l ) {
+ $syslist = [];
+ $list = Zlib\Apps::app_list(local_channel(), false, [ $l ]);
+ if($list) {
+ foreach($list as $li) {
+ $syslist[] = Zlib\Apps::app_encode($li);
+ }
}
- }
- Zlib\Apps::translate_system_apps($syslist);
+
+ Zlib\Apps::translate_system_apps($syslist);
- usort($syslist,'Zotlabs\\Lib\\Apps::app_name_compare');
+ usort($syslist,'Zotlabs\\Lib\\Apps::app_name_compare');
- $syslist = Zlib\Apps::app_order(local_channel(),$syslist);
+ $syslist = Zlib\Apps::app_order(local_channel(),$syslist, $l);
- foreach($syslist as $app) {
- if(strpos($app['categories'],'nav_pinned_app') !== false) {
- $navbar_apps[] = Zlib\Apps::app_render($app,'nav-order');
- }
- else {
- $nav_apps[] = Zlib\Apps::app_render($app,'nav-order');
+ foreach($syslist as $app) {
+ if($l === 'nav_pinned_app') {
+ $navbar_apps[] = Zlib\Apps::app_render($app,'nav-order');
+ }
+ elseif(strpos($app['categories'],'nav_pinned_app') === false) {
+ $nav_apps[] = Zlib\Apps::app_render($app,'nav-order');
+ }
}
}