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:59:43 +0300
committerPhie <phie@phie.ovh>2019-04-17 16:59:43 +0300
commitc98bc44129bcb549a271dfe59ae384de8ef452cd (patch)
tree88c1ed380fbb6aba3ffe402e46b7e07e26c654d5 /lib
parent86c14e2f57a6c3f647b857cf18795fcc746ac7fb (diff)
rebuilding cache when needed
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Controller/NoteController.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php
index edc963c..25e57fb 100755
--- a/lib/Controller/NoteController.php
+++ b/lib/Controller/NoteController.php
@@ -41,6 +41,10 @@
} catch(\OCP\Files\NotFoundException $e) {
$this->CarnetFolder = $RootFolder->getUserFolder($this->userId)->newFolder($folder);
}
+ if(!$this->Config->getSystemValue('has_rebuilt_cache')){
+ shell_exec('php occ carnet:cache rebuild > /dev/null 2>/dev/null &');
+ $this->Config->setSystemValue('has_rebuilt_cache', true);
+ }
// \OC_Util::tearDownFS();
// \OC_Util::setupFS($UserId);
}