| @@ 202-208 (lines=7) @@ | ||
| 199 | if ($note instanceof OwnNote) { |
|
| 200 | $group = $note->getGrouping(); |
|
| 201 | $name = $note->getName(); |
|
| 202 | if ($FOLDER != '') { |
|
| 203 | $tmpfile = $FOLDER . "/" . $name . ".htm"; |
|
| 204 | if ($group != '') |
|
| 205 | $tmpfile = $FOLDER . "/[" . $group . "] " . $name . ".htm"; |
|
| 206 | if (Filesystem::file_exists($tmpfile)) |
|
| 207 | Filesystem::unlink($tmpfile); |
|
| 208 | } |
|
| 209 | $this->noteMapper->deleteNote($note); |
|
| 210 | return true; |
|
| 211 | } else { |
|
| @@ 223-229 (lines=7) @@ | ||
| 220 | public function removeFile($FOLDER, $note){ |
|
| 221 | $group = $note->getGrouping(); |
|
| 222 | $name = $note->getName(); |
|
| 223 | if ($FOLDER != '') { |
|
| 224 | $tmpfile = $FOLDER . "/" . $name . ".htm"; |
|
| 225 | if ($group != '') |
|
| 226 | $tmpfile = $FOLDER . "/[" . $group . "] " . $name . ".htm"; |
|
| 227 | if (Filesystem::file_exists($tmpfile)) |
|
| 228 | Filesystem::unlink($tmpfile); |
|
| 229 | } |
|
| 230 | } |
|
| 231 | ||
| 232 | /** |
|
| @@ 436-442 (lines=7) @@ | ||
| 433 | ||
| 434 | $this->db->executeQuery("DELETE FROM *PREFIX*ownnote_parts WHERE id=?", Array($nid)); |
|
| 435 | ||
| 436 | if ($FOLDER != '') { |
|
| 437 | $tmpfile = $FOLDER . "/" . $name . ".htm"; |
|
| 438 | if ($group != '') |
|
| 439 | $tmpfile = $FOLDER . "/[" . $group . "] " . $name . ".htm"; |
|
| 440 | if (Filesystem::file_exists($tmpfile)) |
|
| 441 | Filesystem::unlink($tmpfile); |
|
| 442 | } |
|
| 443 | return true; |
|
| 444 | } |
|
| 445 | ||