diff options
author | Phie <phie@phie.ovh> | 2019-04-17 16:38:36 +0300 |
---|---|---|
committer | Phie <phie@phie.ovh> | 2019-04-17 16:38:36 +0300 |
commit | 282e0390e9f984374a5972cd5da7242c8e55aca9 (patch) | |
tree | c5b80ea6503e591a81810c020a5540dcd7e3f98d /lib | |
parent | 372fa85dd33e4ee4daf4286f0379e33354904029 (diff) |
fix get search cache
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/Controller/NoteController.php | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index 329dedc..5f3587b 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -551,18 +551,23 @@ * @NoCSRFRequired */ public function getSearchCache(){ + $return = array(); + $return["files"] = array(); + try { $c = json_decode($this->getCacheFolder()->get("carnet_search")->getContent()); - if($c) - return $c; + if($c){ + $return["files"] = $c; + } + } catch(\OCP\Files\NotFoundException $e) { } catch(\OCP\Lock\LockedException $e){ sleep(2); $c = json_decode($this->getCacheFolder()->get("carnet_search")->getContent()); if($c) - return $c; + $return["files"] = $c; } - return array(); + return $return; } /** |