From 109680149a5e1b433164cf634c5be233b002e3e9 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Mon, 6 May 2019 18:45:09 -0100 Subject: +limitToType Signed-off-by: Maxence Lange --- lib/Db/NotesRequest.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'lib/Db/NotesRequest.php') diff --git a/lib/Db/NotesRequest.php b/lib/Db/NotesRequest.php index 5a8bb8c1..f9267366 100644 --- a/lib/Db/NotesRequest.php +++ b/lib/Db/NotesRequest.php @@ -155,7 +155,7 @@ class NotesRequest extends NotesRequestBuilder { $qb = $this->getNotesSelectSql(); $this->limitToIdString($qb, $id); - $this->limitToType($qb, Note::TYPE); +// $this->limitToType($qb, Note::TYPE); if ($asViewer) { $this->limitToViewer($qb); @@ -510,11 +510,15 @@ class NotesRequest extends NotesRequestBuilder { /** * @param string $id + * @param string $type */ - public function deleteNoteById(string $id) { + public function deleteNoteById(string $id, string $type = '') { $qb = $this->getNotesDeleteSql(); - $this->limitToType($qb, Note::TYPE); + $this->limitToIdString($qb, $id); + if ($type !== '') { + $this->limitToType($qb, $type); + } $qb->execute(); } -- cgit v1.2.3