removed user specified hardcode

This commit is contained in:
Felix Ivo 2025-06-23 10:52:30 +02:00
parent 7d1d48199a
commit 21aa81dbd3
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ $isEditMode = false;
$note = null; $note = null;
if ($isEditMode) { if ($isEditMode) {
$noteId = $_GET['id'] ?? 0; $noteId = $_GET['id'] ?? 0;
$note = $this->notesModel->getNoteById($noteId, 2); //$_SESSION['user_id'] $note = $this->notesModel->getNoteById($noteId, $_SESSION['user_id']);
if (!$note) { if (!$note) {
echo "<div class='alert alert-danger'>Note not found or you don't have permission to edit it.</div>"; echo "<div class='alert alert-danger'>Note not found or you don't have permission to edit it.</div>";
echo "<a href='?controller=Notes&page=showNotes&do=showNotes' class='button secondary'>Back to Dashboard</a>"; echo "<a href='?controller=Notes&page=showNotes&do=showNotes' class='button secondary'>Back to Dashboard</a>";

View File

@ -8,7 +8,7 @@ $isEditMode = true;
$note = null; $note = null;
if ($isEditMode) { if ($isEditMode) {
$noteId = $_GET['id'] ?? 0; $noteId = $_GET['id'] ?? 0;
$note = $this->notesModel->getNoteById($noteId, 2); //$_SESSION['user_id'] $note = $this->notesModel->getNoteById($noteId, $_SESSION['user_id']);
if (!$note) { if (!$note) {
echo "<div class='alert alert-danger'>Note not found or you don't have permission to edit it.</div>"; echo "<div class='alert alert-danger'>Note not found or you don't have permission to edit it.</div>";
echo "<a href='?controller=Notes&page=showNotes&do=showNotes' class='button secondary'>Back to Dashboard</a>"; echo "<a href='?controller=Notes&page=showNotes&do=showNotes' class='button secondary'>Back to Dashboard</a>";