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
diff options
context:
space:
mode:
authorPhieF <phie@phie.ovh>2020-09-11 16:42:42 +0300
committerGitHub <noreply@github.com>2020-09-11 16:42:42 +0300
commit79d89e0c1b4e3263bf78d5475121f5973eab4ec3 (patch)
tree249a7c84fbe74d140d7fdc2fcd8c64aafa6ad1f4
parent629bae4978d58a538ab55b2c5f71d9852a62fb05 (diff)
parent1e1deb94d9945ad4d4abbfc68dbcb9a03e9c4f91 (diff)
Merge pull request #123 from dominiquefournier/patch-log-using
Patch log using
-rwxr-xr-xlib/Controller/NoteController.php4
-rw-r--r--lib/Misc/CacheManager.php5
2 files changed, 6 insertions, 3 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php
index 30d57ad..69f8717 100755
--- a/lib/Controller/NoteController.php
+++ b/lib/Controller/NoteController.php
@@ -998,7 +998,9 @@ public function getOpusEncoder(){
}
$file->putContent($tmph);
- fclose($tmph);
+ // Do not close $tmph, it is closed by putContent, and a log is displayed as
+ // fclose can not work
+ //fclose($tmph);
$meta['metadata'] = json_decode($folder->get("metadata.json")->getContent());
$meta['shorttext'] = NoteUtils::getShortTextFromHTML($folder->get("index.html")->getContent());
$cache = new CacheManager($this->db, $this->CarnetFolder);
diff --git a/lib/Misc/CacheManager.php b/lib/Misc/CacheManager.php
index ceeb17c..3fe904e 100644
--- a/lib/Misc/CacheManager.php
+++ b/lib/Misc/CacheManager.php
@@ -95,7 +95,8 @@ class CacheManager{
public function deleteFromCache($relativePath){
$sql = 'DELETE FROM `*PREFIX*carnet_metadata` WHERE `path` = ?';
$stmt = $this->db->prepare($sql);
- $stmt->bindParam(1, $this->carnetFolder->getFullPath($relativePath), \PDO::PARAM_STR);
+ $param = $this->carnetFolder->getFullPath($relativePath);
+ $stmt->bindParam(1, $param, \PDO::PARAM_STR);
$stmt->execute();
}
@@ -152,4 +153,4 @@ class CacheManager{
return $array;
}
}
-?> \ No newline at end of file
+?>