diff --git a/core/ajax/navigationdetect.php b/settings/ajax/navigationdetect.php
similarity index 85%
rename from core/ajax/navigationdetect.php
rename to settings/ajax/navigationdetect.php
index c7d0bd38dbc8597f53da0d5b0cfc1ff5a4c4d02f..93acb50dc200adffd78285b94fc46c4d084839be 100644
--- a/core/ajax/navigationdetect.php
+++ b/settings/ajax/navigationdetect.php
@@ -1,9 +1,5 @@
 <?php
 
-$RUNTIME_NOAPPS = true;
-
-require_once '../../lib/base.php';
-
 OC_Util::checkAdminUser();
 OCP\JSON::callCheck();
 
diff --git a/settings/js/apps.js b/settings/js/apps.js
index e45abf9b3dde4f6ee895dbabe24dfd367fc49ba1..c4c36b4bb12a84b85c3deb0e47b58847e68af9ce 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 4f4f83e4542298b28c2631e910de268bf177789e..64f4650eb8c723360bb103b9ba4071440f14acc5 100644
--- a/settings/routes.php
+++ b/settings/routes.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');