diff options
author | PhieF <phie@phie.ovh> | 2020-09-10 13:25:09 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-10 13:25:09 +0300 |
commit | 9804d6fde7527ad44b486c8e050607025d2f4072 (patch) | |
tree | 02cd97cecc861529a652db89fbff507f2cd9b8cd | |
parent | ba1d12bdfdff7f1c954e8459b4a64813fb2a0b29 (diff) | |
parent | 5f9936294e809d6b036dd3734b810640720234cc (diff) |
Merge pull request #121 from dominiquefournier/patch-log-untitleddonotedit
Do not generate logs when the user try to remove/move untitleddonoted…
-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(); |