navigationdetect.php 338 B

1234567891011121314151617
  1. <?php
  2. OC_Util::checkAdminUser();
  3. OCP\JSON::callCheck();
  4. $app = $_GET['app'];
  5. $app = OC_App::cleanAppId($app);
  6. $navigation = OC_App::getAppNavigationEntries($app);
  7. $navIds = array();
  8. foreach ($navigation as $nav) {
  9. $navIds[] = $nav['id'];
  10. }
  11. OCP\JSON::success(array('nav_ids' => array_values($navIds), 'nav_entries' => $navigation));