Skip to content

Commit

Permalink
pkp/pkp-lib#10698 Fix notification settings form
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Dec 13, 2024
1 parent baeeb7b commit edd0f34
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions classes/notification/NotificationManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getNotificationMessage(PKPRequest $request, Notification $notifi
*/
public function _getArticleTitle(Notification $notification): ?string
{
if($notification->assocType != Application::ASSOC_TYPE_SUBMISSION) {
if ($notification->assocType != Application::ASSOC_TYPE_SUBMISSION) {
throw new \Exception('Unexpected assoc type!');
}
$article = Repo::submission()->get($notification->assocId);
Expand Down Expand Up @@ -139,7 +139,7 @@ protected function getMgrDelegate(int $notificationType, int $assocType, int $as
switch ($notificationType) {
case Notification::NOTIFICATION_TYPE_APPROVE_SUBMISSION:
case Notification::NOTIFICATION_TYPE_VISIT_CATALOG:
if($assocType != Application::ASSOC_TYPE_SUBMISSION) {
if ($assocType != Application::ASSOC_TYPE_SUBMISSION) {
throw new \Exception('Unexpected assoc type!');
}
return new ApproveSubmissionNotificationManager($notificationType);
Expand All @@ -153,7 +153,7 @@ protected function getMgrDelegate(int $notificationType, int $assocType, int $as
*/
public function getNotificationSettingsMap(): array
{
return array_merge(parent::getNotificationSettingsMap(), [
return [
AppNotification::NOTIFICATION_TYPE_PUBLISHED_ISSUE => [
'settingName' => 'notificationPublishedIssue',
'emailSettingName' => 'emailNotificationPublishedIssue',
Expand All @@ -164,7 +164,8 @@ public function getNotificationSettingsMap(): array
'emailSettingName' => 'emailNotificationOpenAccess',
'settingKey' => 'notification.type.openAccess',
],
]);
...parent::getNotificationSettingsMap(),
];
}
}

Expand Down

0 comments on commit edd0f34

Please sign in to comment.