Skip to content

Commit

Permalink
Bug openemr fix #6820 fax api call (#6821)
Browse files Browse the repository at this point in the history
* Fixes #6820 fix module api usage for fax/sms

Fixed it so that if you fire the SendNotificationEvent event inside an API
call it will no longer be silently ignored in the fax/sms module.

Changed the module to use the user_id or pid in the session as a
determinant of the session being populated instead of the
session_database_uuid.

* Fix spelling error
  • Loading branch information
adunsulag committed Aug 31, 2023
1 parent 30d94bb commit 9e60884
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function sendNotification(pid, docName, details) {
$eventDispatcher->addListener(SendSmsEvent::JAVASCRIPT_READY_SMS_POST, 'oe_module_faxsms_sms_render_javascript_post_load');
}

if (!empty($_SESSION['session_database_uuid'] ?? null) && $allowSMS) {
if (!(empty($_SESSION['authUserID'] ?? null) && ($_SESSION['pid'] ?? null)) && $allowSMS) {
$eventDispatcher->addListener(SendNotificationEvent::SEND_NOTIFICATION_BY_SERVICE, [new NotificationEventListener(), 'onNotifyEvent']);
}
$eventDispatcher->addListener(SendNotificationEvent::ACTIONS_RENDER_NOTIFICATION_POST, 'notificationButton');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function emailNotification($email, $body, $file = null): string
$to = $email;
$to_name = $email;
$mail->AddAddress($to, $to_name);
$subject = xlt("Your clinic ask for your attention.");
$subject = xlt("Your clinic asks for your attention.");
$mail->Subject = $subject;
$mail->Body = $body;
if (!empty($file)) {
Expand Down

0 comments on commit 9e60884

Please sign in to comment.