Replacing :: by NotificationService::
This commit is contained in:
parent
166927f8af
commit
0e0becb5c4
@ -139,7 +139,7 @@ if (isset($_POST['update_poll_info'])) {
|
|||||||
// Update poll in database
|
// Update poll in database
|
||||||
if ($updated && $adminPollService->updatePoll($poll)) {
|
if ($updated && $adminPollService->updatePoll($poll)) {
|
||||||
$message = new Message('success', __('adminstuds', 'Poll saved'));
|
$message = new Message('success', __('adminstuds', 'Poll saved'));
|
||||||
$notificationService->sendUpdateNotification($poll, $notificationService::UPDATE_POLL);
|
$notificationService->sendUpdateNotification($poll, NotificationService::UPDATE_POLL);
|
||||||
} else {
|
} else {
|
||||||
$message = new Message('danger', __('Error', 'Failed to save poll'));
|
$message = new Message('danger', __('Error', 'Failed to save poll'));
|
||||||
$poll = $pollService->findById($poll_id);
|
$poll = $pollService->findById($poll_id);
|
||||||
@ -304,7 +304,7 @@ if (isset($_POST['delete_poll'])) {
|
|||||||
if (isset($_POST['confirm_delete_poll'])) {
|
if (isset($_POST['confirm_delete_poll'])) {
|
||||||
if ($adminPollService->deleteEntirePoll($poll_id)) {
|
if ($adminPollService->deleteEntirePoll($poll_id)) {
|
||||||
$message = new Message('success', __('adminstuds', 'Poll fully deleted'));
|
$message = new Message('success', __('adminstuds', 'Poll fully deleted'));
|
||||||
$notificationService->sendUpdateNotification($poll, $notificationService::DELETED_POLL);
|
$notificationService->sendUpdateNotification($poll, NotificationService::DELETED_POLL);
|
||||||
} else {
|
} else {
|
||||||
$message = new Message('danger', __('Error', 'Failed to delete the poll'));
|
$message = new Message('danger', __('Error', 'Failed to delete the poll'));
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ if (!empty($_POST['save'])) { // Save edition of an old vote
|
|||||||
} else {
|
} else {
|
||||||
$message = new Message('success', __('studs', 'Update vote succeeded'));
|
$message = new Message('success', __('studs', 'Update vote succeeded'));
|
||||||
}
|
}
|
||||||
$notificationService->sendUpdateNotification($poll, $notificationService::UPDATE_VOTE, $name);
|
$notificationService->sendUpdateNotification($poll, NotificationService::UPDATE_VOTE, $name);
|
||||||
} else {
|
} else {
|
||||||
$message = new Message('danger', __('Error', 'Update vote failed'));
|
$message = new Message('danger', __('Error', 'Update vote failed'));
|
||||||
}
|
}
|
||||||
@ -122,7 +122,7 @@ if (!empty($_POST['save'])) { // Save edition of an old vote
|
|||||||
} else {
|
} else {
|
||||||
$message = new Message('success', __('studs', 'Adding the vote succeeded'));
|
$message = new Message('success', __('studs', 'Adding the vote succeeded'));
|
||||||
}
|
}
|
||||||
$notificationService->sendUpdateNotification($poll, $notificationService::ADD_VOTE, $name);
|
$notificationService->sendUpdateNotification($poll, NotificationService::ADD_VOTE, $name);
|
||||||
} else {
|
} else {
|
||||||
$message = new Message('danger', __('Error', 'Adding vote failed'));
|
$message = new Message('danger', __('Error', 'Adding vote failed'));
|
||||||
}
|
}
|
||||||
@ -146,7 +146,7 @@ if (isset($_POST['add_comment'])) {
|
|||||||
$result = $pollService->addComment($poll_id, $name, $comment);
|
$result = $pollService->addComment($poll_id, $name, $comment);
|
||||||
if ($result) {
|
if ($result) {
|
||||||
$message = new Message('success', __('Comments', 'Comment added'));
|
$message = new Message('success', __('Comments', 'Comment added'));
|
||||||
$notificationService->sendUpdateNotification($poll, $notificationService::ADD_COMMENT, $name);
|
$notificationService->sendUpdateNotification($poll, NotificationService::ADD_COMMENT, $name);
|
||||||
} else {
|
} else {
|
||||||
$message = new Message('danger', __('Error', 'Comment failed'));
|
$message = new Message('danger', __('Error', 'Comment failed'));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user