summaryrefslogtreecommitdiffstats
path: root/lib/Db/NotesRequest.php
diff options
context:
space:
mode:
authorMaxence Lange <maxence@artificial-owl.com>2019-05-06 18:45:09 -0100
committerMaxence Lange <maxence@artificial-owl.com>2019-05-06 18:45:09 -0100
commit109680149a5e1b433164cf634c5be233b002e3e9 (patch)
treebfe867a8cc128ec433e2bfe1e6b36ba92223bea8 /lib/Db/NotesRequest.php
parent88a0d72740dc8c3bff670f013f04eda758f8940a (diff)
+limitToType
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>
Diffstat (limited to 'lib/Db/NotesRequest.php')
-rw-r--r--lib/Db/NotesRequest.php10
1 files changed, 7 insertions, 3 deletions
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();
}