use non static access to search

This commit is contained in:
Jörn Friedrich Dreyer 2014-06-06 11:02:05 +02:00
parent 56470fa9b3
commit 2801f0f222
2 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ OCP\App::addNavigationEntry(array("id" => "files_index",
"icon" => OCP\Util::imagePath("core", "places/files.svg"),
"name" => $l->t("Files")));
OC_Search::registerProvider('OC_Search_Provider_File');
\OC::$server->getSearch()->registerProvider('OC\Search\Provider\File');
$templateManager = OC_Helper::getFileTemplateManager();
$templateManager->registerTemplate('text/html', 'core/templates/filetemplates/template.html');

View File

@ -26,7 +26,7 @@ OC_JSON::checkLoggedIn();
$query=(isset($_GET['query']))?$_GET['query']:'';
if($query) {
$result=OC_Search::search($query);
$result = \OC::$server->getSearch()->search($query);
OC_JSON::encodedPrint($result);
}
else {