summaryrefslogtreecommitdiffstats
path: root/settings
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-10-30 22:59:55 +0100
committerRobin Appelman <icewind@owncloud.com>2012-10-30 22:59:55 +0100
commit6e9e2634978f08494a13bb3c5185032fc0ed7792 (patch)
tree8f0cf5eef65c29715c84b2c253834a2fa047bbd7 /settings
parent890fbb82993db294489fb6ecf14d91d7652763d1 (diff)
parent6738275b01abf514d32171da604da8d63a2808e0 (diff)
downloadnextcloud-server-6e9e2634978f08494a13bb3c5185032fc0ed7792.tar.gz
nextcloud-server-6e9e2634978f08494a13bb3c5185032fc0ed7792.zip
merge master into filesystem
Diffstat (limited to 'settings')
-rw-r--r--settings/ajax/navigationdetect.php18
-rw-r--r--settings/js/apps.js4
-rw-r--r--settings/routes.php6
3 files changed, 24 insertions, 4 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));
diff --git a/settings/js/apps.js b/settings/js/apps.js
index e45abf9b3dd..c4c36b4bb12 100644
--- a/settings/js/apps.js
+++ b/settings/js/apps.js
@@ -91,7 +91,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
return app;
},
removeNavigation: function(appid){
- $.getJSON(OC.filePath('core','ajax','navigationdetect.php'), {app: appid}).done(function(response){
+ $.getJSON(OC.filePath('settings', 'ajax', 'navigationdetect.php'), {app: appid}).done(function(response){
if(response.status === 'success'){
var navIds=response.nav_ids;
for(var i=0; i< navIds.length; i++){
@@ -101,7 +101,7 @@ OC.Settings.Apps = OC.Settings.Apps || {
});
},
addNavigation: function(appid){
- $.getJSON(OC.filePath('core','ajax','navigationdetect.php'), {app: appid}).done(function(response){
+ $.getJSON(OC.filePath('settings', 'ajax', 'navigationdetect.php'), {app: appid}).done(function(response){
if(response.status === 'success'){
var navEntries=response.nav_entries;
for(var i=0; i< navEntries.length; i++){
diff --git a/settings/routes.php b/settings/routes.php
index 4f4f83e4542..8239fe005db 100644
--- a/settings/routes.php
+++ b/settings/routes.php
@@ -24,13 +24,13 @@ $this->create('settings_admin', '/settings/admin')
$this->create('settings_ajax_userlist', '/settings/ajax/userlist')
->actionInclude('settings/ajax/userlist.php');
$this->create('settings_ajax_createuser', '/settings/ajax/createuser.php')
- ->actionInclude('settings_ajax_createuser');
+ ->actionInclude('settings/ajax/createuser.php');
$this->create('settings_ajax_removeuser', '/settings/ajax/removeuser.php')
->actionInclude('settings/ajax/removeuser.php');
$this->create('settings_ajax_setquota', '/settings/ajax/setquota.php')
->actionInclude('settings/ajax/setquota.php');
$this->create('settings_ajax_creategroup', '/settings/ajax/creategroup.php')
- ->actionInclude('settings_ajax_creategroup');
+ ->actionInclude('settings/ajax/creategroup.php');
$this->create('settings_ajax_togglegroups', '/settings/ajax/togglegroups.php')
->actionInclude('settings/ajax/togglegroups.php');
$this->create('settings_ajax_togglesubadmins', '/settings/ajax/togglesubadmins.php')
@@ -51,6 +51,8 @@ $this->create('settings_ajax_enableapp', '/settings/ajax/enableapp.php')
->actionInclude('settings/ajax/enableapp.php');
$this->create('settings_ajax_disableapp', '/settings/ajax/disableapp.php')
->actionInclude('settings/ajax/disableapp.php');
+$this->create('settings_ajax_navigationdetect', '/settings/ajax/navigationdetect.php')
+ ->actionInclude('settings/ajax/navigationdetect.php');
// admin
$this->create('settings_ajax_getlog', '/settings/ajax/getlog.php')
->actionInclude('settings/ajax/getlog.php');