Skip to content

Commit

Permalink
fix: bug (openemr#7435)
Browse files Browse the repository at this point in the history
* fix: bug

* else die
  • Loading branch information
stephenwaite authored May 21, 2024
1 parent 31fdc36 commit fbfa180
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions interface/main/messages/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,12 @@
$datetime = isset($_POST['form_datetime']) ? DateTimeToYYYYMMDDHHMMSS($_POST['form_datetime']) : '';
foreach ($assigned_to_list as $assigned_to) {
if ($noteid && $assigned_to != '-patient-') {
updatePnote($noteid, $note, $form_note_type, $assigned_to, $form_message_status, $datetime);
$noteid = '';
if (checkPnotesNoteId($note_id, $_SESSION['authUser'])) {
updatePnote($noteid, $note, $form_note_type, $assigned_to, $form_message_status, $datetime);
$noteid = '';
} else {
die("Message is not assigned to you. Adding is disallowed.");
}
} else {
if ($noteid && $assigned_to == '-patient-') {
// When $assigned_to == '-patient-' we don't update the current note, but
Expand Down

0 comments on commit fbfa180

Please sign in to comment.