From dc17019536551915e4417b08904e9fb5f6f49689 Mon Sep 17 00:00:00 2001
From: Morris Jobke <hey@morrisjobke.de>
Date: Tue, 13 Jan 2015 16:42:04 +0100
Subject: [PATCH] adjust paths for search

---
 core/js/core.json        | 2 +-
 core/js/js.js            | 2 +-
 core/routes.php          | 4 ++--
 core/search/js/search.js | 6 +++---
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/core/js/core.json b/core/js/core.json
index 101a88cd4f..2fb7842624 100644
--- a/core/js/core.json
+++ b/core/js/core.json
@@ -23,6 +23,6 @@
 		"config.js",
 		"multiselect.js",
 		"oc-requesttoken.js",
-		"../../search/js/search.js"
+		"../search/js/search.js"
 	]
 }
diff --git a/core/js/js.js b/core/js/js.js
index 579bf09b2e..234cc328df 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -74,7 +74,7 @@ var OC={
 	config: window.oc_config,
 	appConfig: window.oc_appconfig || {},
 	theme: window.oc_defaults || {},
-	coreApps:['', 'admin','log','search','settings','core','3rdparty'],
+	coreApps:['', 'admin','log','core/search','settings','core','3rdparty'],
 	menuSpeed: 100,
 
 	/**
diff --git a/core/routes.php b/core/routes.php
index ced70898f5..defbb695a7 100644
--- a/core/routes.php
+++ b/core/routes.php
@@ -22,8 +22,8 @@ $application->registerRoutes($this, array('routes' => array(
 /** @var $this OCP\Route\IRouter */
 // Core ajax actions
 // Search
-$this->create('search_ajax_search', '/search/ajax/search.php')
-	->actionInclude('search/ajax/search.php');
+$this->create('search_ajax_search', '/core/search')
+	->actionInclude('core/search/ajax/search.php');
 // AppConfig
 $this->create('core_ajax_appconfig', '/core/ajax/appconfig.php')
 	->actionInclude('core/ajax/appconfig.php');
diff --git a/core/search/js/search.js b/core/search/js/search.js
index 57de07bf7f..c6542ffc13 100644
--- a/core/search/js/search.js
+++ b/core/search/js/search.js
@@ -97,7 +97,7 @@
 			 */
 			this.search = function(query, inApps, page, size) {
 				if (query) {
-					OC.addStyle('search','results');
+					OC.addStyle('core/search','results');
 					if (typeof page !== 'number') {
 						page = 1;
 					}
@@ -128,7 +128,7 @@
 						$status.html(t('core', 'Searching other places')+'<img class="spinner" alt="search in progress" src="'+OC.webroot+'/core/img/loading.gif" />');
 
 						// do the actual search query
-						$.getJSON(OC.generateUrl('search/ajax/search.php'), {query:query, inApps:inApps, page:page, size:size }, function(results) {
+						$.getJSON(OC.generateUrl('core/search'), {query:query, inApps:inApps, page:page, size:size }, function(results) {
 							lastResults = results;
 							if (page === 1) {
 								showResults(results);
@@ -364,7 +364,7 @@ $(document).ready(function() {
 	$('#app-content')
 		.append($searchResults)
 		.find('.viewcontainer').css('min-height', 'initial');
-	$searchResults.load(OC.webroot + '/search/templates/part.results.html', function () {
+	$searchResults.load(OC.webroot + '/core/search/templates/part.results.html', function () {
 		OC.Search = new OCA.Search($('#searchbox'), $('#searchresults'));
 	});
 });
-- 
GitLab