diff options
author | Dominique Fournier <dominique.fournier@grenoble.cnrs.fr> | 2020-09-10 11:58:42 +0300 |
---|---|---|
committer | Dominique Fournier <dominique.fournier@grenoble.cnrs.fr> | 2020-09-10 11:58:42 +0300 |
commit | 5f9936294e809d6b036dd3734b810640720234cc (patch) | |
tree | 02cd97cecc861529a652db89fbff507f2cd9b8cd | |
parent | ba1d12bdfdff7f1c954e8459b4a64813fb2a0b29 (diff) |
Do not generate logs when the user try to remove/move untitleddonoted cards
-rwxr-xr-x | lib/Controller/NoteController.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/Controller/NoteController.php b/lib/Controller/NoteController.php index 88b9b32..30d57ad 100755 --- a/lib/Controller/NoteController.php +++ b/lib/Controller/NoteController.php @@ -653,9 +653,11 @@ public function getOpusEncoder(){ * @NoAdminRequired * @NoCSRFRequired */ - public function deleteNote($path){ - $this->CarnetFolder->get($path)->delete(); - } + public function deleteNote($path){ + if ($path === "untitleddonotedit.sqd") + return; + $this->CarnetFolder->get($path)->delete(); + } /** * @NoAdminRequired @@ -665,6 +667,8 @@ public function getOpusEncoder(){ if($this->CarnetFolder->nodeExists($to)){ throw new Exception("Already exists"); } + if ($from === "untitleddonotedit.sqd") + return; $this->CarnetFolder->get($from)->move($this->CarnetFolder->getFullPath($to)); $actions = array(); $actions[0] = array(); |