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
path: root/lib
diff options
context:
space:
mode:
authorPhie <phie@phie.ovh>2019-04-17 16:38:36 +0300
committerPhie <phie@phie.ovh>2019-04-17 16:38:36 +0300
commit282e0390e9f984374a5972cd5da7242c8e55aca9 (patch)
treec5b80ea6503e591a81810c020a5540dcd7e3f98d /lib
parent372fa85dd33e4ee4daf4286f0379e33354904029 (diff)
fix get search cache
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Controller/NoteController.php13
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;
}
/**