use non static access to search
This commit is contained in:
parent
56470fa9b3
commit
2801f0f222
|
@ -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');
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue