diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-26 20:12:14 +0200 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-26 20:13:24 +0200 |
commit | da57fbc93a6df7f477bf680f1a97c1b43075f3b5 (patch) | |
tree | c602edd73b75e136c2285f474e12d8712b05019d /core | |
parent | d428d72dabf1d0f451f5dedc8e7e5cc654e04ffb (diff) | |
download | nextcloud-server-da57fbc93a6df7f477bf680f1a97c1b43075f3b5.tar.gz nextcloud-server-da57fbc93a6df7f477bf680f1a97c1b43075f3b5.zip |
show/hide navigation entries after enabling/disabling app
Diffstat (limited to 'core')
-rw-r--r-- | core/ajax/navigationdetect.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/core/ajax/navigationdetect.php b/core/ajax/navigationdetect.php new file mode 100644 index 00000000000..c7d0bd38dbc --- /dev/null +++ b/core/ajax/navigationdetect.php @@ -0,0 +1,22 @@ +<?php + +$RUNTIME_NOAPPS = true; + +require_once '../../lib/base.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)); |