summaryrefslogtreecommitdiffstats
path: root/settings/ajax/navigationdetect.php
blob: 607c0e873f9dcff5acc2de16781850b42049cf98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

OC_Util::checkAdminUser();
OCP\JSON::callCheck();

$app = $_GET['app'];
$app = OC_App::cleanAppId($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));