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-08-15 18:47:39 +0300
committerPhie <phie@phie.ovh>2019-08-15 18:47:39 +0300
commite0cfa6cbd8c79a89e72376ab24ba7ace2cd6165b (patch)
tree3405d1ba1d3ea62dc5a7eab79a1f6fe445b7c21a /lib
parente6d59aa027f76af6cf136dd88eb561b773888d16 (diff)
faster merge: ignore old db
Diffstat (limited to 'lib')
-rwxr-xr-xlib/Controller/NoteController.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php
index c3e8429..99d0248 100755
--- a/lib/Controller/NoteController.php
+++ b/lib/Controller/NoteController.php
@@ -281,8 +281,9 @@
public function mergeKeywordsDB() {
$myDb = $this->getKeywordsDBFile();
$hasChanged = false;
+ $lastmod = $myDb->getMTime();
foreach($this->CarnetFolder->get("quickdoc/keywords/")->getDirectoryListing() as $inDB){
- if($inDB->getName() === $myDb->getName()){
+ if($inDB->getName() === $myDb->getName()||$inDB->getMTime()<$lastmod){
continue;
}
$myDbContent = json_decode($myDb->getContent());
@@ -331,9 +332,10 @@
*/
public function mergeRecentDB() {
$myDb = $this->getRecentFile();
+ $lastmod = $myDb->getMTime();
$hasChanged = false;
foreach($this->CarnetFolder->get("quickdoc/recentdb/")->getDirectoryListing() as $inDB){
- if($inDB->getName() === $myDb->getName()){
+ if($inDB->getName() === $myDb->getName()||$inDB->getMTime()<$lastmod){
continue;
}
$myDbContent = json_decode($myDb->getContent());