diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-10-28 18:52:18 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-10-29 15:04:55 +0100 |
commit | 1bdd0c949bca2f68da0ab3f47efbec10a7e51702 (patch) | |
tree | 62fbadd89e54810cc4c60ba6887cb0bc3e8d28f5 /settings/ajax | |
parent | ab4ade0d24e9bba51bbdaac9a5fe06a3eff63355 (diff) | |
download | nextcloud-server-1bdd0c949bca2f68da0ab3f47efbec10a7e51702.tar.gz nextcloud-server-1bdd0c949bca2f68da0ab3f47efbec10a7e51702.zip |
Move and fix app setting navigation detect
Diffstat (limited to 'settings/ajax')
-rw-r--r-- | settings/ajax/navigationdetect.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/settings/ajax/navigationdetect.php b/settings/ajax/navigationdetect.php new file mode 100644 index 00000000000..93acb50dc20 --- /dev/null +++ b/settings/ajax/navigationdetect.php @@ -0,0 +1,18 @@ +<?php + +OC_Util::checkAdminUser(); +OCP\JSON::callCheck(); + +$app = $_GET['app']; + +//load the one app and see what it adds to the navigation +OC_App::loadApp($app); + +$navigation = OC_App::getNavigation(); + +$navIds = array(); +foreach ($navigation as $nav) { + $navIds[] = $nav['id']; +} + +OCP\JSON::success(array('nav_ids' => array_values($navIds), 'nav_entries' => $navigation)); |