aboutsummaryrefslogtreecommitdiffhomepage
path: root/Digitigrade/Model/NoteAttachment.php
diff options
context:
space:
mode:
authorwinter2025-01-28 20:34:49 +0000
committerwinter2025-01-28 20:34:49 +0000
commite591374bb4b7d231fadf99d2e278806e53971919 (patch)
tree146bc3eeca58fb298dc204341734f55680509c00 /Digitigrade/Model/NoteAttachment.php
parent09a42d23cd067dc5c2a7d4f03e8f074a9317f6c8 (diff)
display attachments on notes
Diffstat (limited to 'Digitigrade/Model/NoteAttachment.php')
-rw-r--r--Digitigrade/Model/NoteAttachment.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/Digitigrade/Model/NoteAttachment.php b/Digitigrade/Model/NoteAttachment.php
index c47ec64..9e6a3d3 100644
--- a/Digitigrade/Model/NoteAttachment.php
+++ b/Digitigrade/Model/NoteAttachment.php
@@ -10,13 +10,13 @@ class NoteAttachment extends Model {
public string $href;
public ?string $description;
- protected function setOwnerId(int $id) {
+ public function setOwnerId(int $id) {
$this->noteId = $id;
}
protected function getUpdateWhereClause($db): ?string {
- if (self::findWhere('note_id = ?', [$this->noteId]) != null) {
- return "note_id = $this->noteId";
+ if (self::findWhere('note_id = ? AND index = ?', [$this->noteId, $this->index]) != null) {
+ return "note_id = $this->noteId AND index = $this->index";
}
return null;
}