From 60c5cc5c146fd6d97af3ac8db657909d0524868f Mon Sep 17 00:00:00 2001 From: Phie Date: Sat, 19 Sep 2020 22:05:51 +0200 Subject: fix lower case text --- lib/Misc/CacheManager.php | 4 ++-- lib/Misc/NoteUtils.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Misc/CacheManager.php b/lib/Misc/CacheManager.php index 045421d..a619e0c 100644 --- a/lib/Misc/CacheManager.php +++ b/lib/Misc/CacheManager.php @@ -12,7 +12,7 @@ class CacheManager{ } public function addToCache($relativePath, $metadata, $lastmodfile, $text){ - $this->addToCacheFullPath($this->carnetFolder->getFullPath($relativePath), $metadata, $lastmodfile, $low_case_text); + $this->addToCacheFullPath($this->carnetFolder->getFullPath($relativePath), $metadata, $lastmodfile, $text); } public function addToCacheFullPath($fullPath, $metadata, $lastmodfile, $text){ @@ -74,7 +74,7 @@ class CacheManager{ private function recursiveAddToCache($carnetFolder, $node, $cache){ if($node instanceof \OCP\Files\Folder){ foreach($node->getDirectoryListing() as $inNode){ - echo $inNode->getPath(); + echo $inNode->getPath()."\n"; $this->recursiveAddToCache($carnetFolder, $inNode, $cache); } } else if(substr($node->getName(), -3) === "sqd"){ diff --git a/lib/Misc/NoteUtils.php b/lib/Misc/NoteUtils.php index 9c3b244..bbb3e50 100644 --- a/lib/Misc/NoteUtils.php +++ b/lib/Misc/NoteUtils.php @@ -81,7 +81,7 @@ class NoteUtils{ try{ $text = self::getTextFromHTML($zipFile->getEntryContents("index.html")); $meta['shorttext'] = self::getShortText($text); - $meta['lower_case_text'] = strtolower(self::removeAccents($text)); + $meta['text'] = strtolower(self::removeAccents($text)); $meta['media'] = array(); $meta['previews'] = array(); -- cgit v1.2.3