aboutsummaryrefslogtreecommitdiffstats
path: root/core/ajax/navigationdetect.php
blob: c7d0bd38dbc8597f53da0d5b0cfc1ff5a4c4d02f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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));