diff options
Diffstat (limited to 'settings/ajax/navigationdetect.php')
-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)); |