Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CarnetApp/CarnetNextcloud.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Controller/NoteController.php')
-rwxr-xr-xlib/Controller/NoteController.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php
index fdfc62f..6c131f9 100755
--- a/lib/Controller/NoteController.php
+++ b/lib/Controller/NoteController.php
@@ -11,6 +11,7 @@
use OCA\Carnet\Misc\NoteUtils;
use OCA\Carnet\Misc\CacheManager;
use OCP\IDBConnection;
+ use OCA\Carnet\Command\Search;
//require_once 'vendor/autoload.php';
class MyZipFile extends \PhpZip\ZipFile {
@@ -619,14 +620,10 @@ public function getOpusEncoder(){
* @NoAdminRequired
* @NoCSRFRequired
*/
- public function search($from, $query){
- try {
- $this->getCacheFolder()->get("carnet_search")->delete();
- } catch(\OCP\Files\NotFoundException $e) {
-
- }
- shell_exec('php occ carnet:search '.escapeshellarg($this->userId).' '.escapeshellarg($query).' '.escapeshellarg($from).'> /dev/null 2>/dev/null &');
- }
+ public function search($from, $query, $path){
+ $SearchEngine = new Search($this->appName, $this->rootFolder, $this->Config, $this->db, $this->userId);
+ return $SearchEngine->startSearch($query, $from);
+ }
/**
* @NoAdminRequired