| @@ 965-984 (lines=20) @@ | ||
| 962 | } else { |
|
| 963 | //can count how many sent by using the messages in the queue |
|
| 964 | $sent_count = $sent_queue->count_STS_in_queue(EEM_Message::instance()->stati_indicating_sent()); |
|
| 965 | if ($sent_count > 0) { |
|
| 966 | EE_Error::add_success( |
|
| 967 | sprintf( |
|
| 968 | _n( |
|
| 969 | 'There was %d message successfully sent.', |
|
| 970 | 'There were %d messages successfully sent.', |
|
| 971 | $sent_count, |
|
| 972 | 'event_espresso' |
|
| 973 | ), |
|
| 974 | $sent_count |
|
| 975 | ) |
|
| 976 | ); |
|
| 977 | } else { |
|
| 978 | EE_Error::overwrite_errors(); |
|
| 979 | EE_Error::add_error( |
|
| 980 | __('No message was sent because of problems with sending. Either all the messages you selected were not a sendable message, they were ALREADY sent on a different scheduled task, or there was an error. |
|
| 981 | If there was an error, you can look at the messages in the message activity list table for any error messages.', |
|
| 982 | 'event_espresso'), |
|
| 983 | __FILE__, __FUNCTION__, __LINE__ |
|
| 984 | ); |
|
| 985 | } |
|
| 986 | } |
|
| 987 | return $sent_queue; |
|
| @@ 1030-1047 (lines=18) @@ | ||
| 1027 | || EE_Registry::instance()->NET_CFG->core->do_messages_on_same_request |
|
| 1028 | ) { |
|
| 1029 | $queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue(EEM_Message::status_sent); |
|
| 1030 | if ($queue_count > 0) { |
|
| 1031 | EE_Error::add_success( |
|
| 1032 | sprintf( |
|
| 1033 | _n( |
|
| 1034 | '%d message successfully sent.', |
|
| 1035 | '%d messages successfully sent.', |
|
| 1036 | $queue_count, |
|
| 1037 | 'event_espresso' |
|
| 1038 | ), |
|
| 1039 | $queue_count |
|
| 1040 | ) |
|
| 1041 | ); |
|
| 1042 | } else { |
|
| 1043 | EE_Error::add_error( |
|
| 1044 | __('No messages were queued for resending. This usually only happens when all the messages flagged for resending are not a status that can be resent.', |
|
| 1045 | 'event_espresso'), |
|
| 1046 | __FILE__, __FUNCTION__, __LINE__ |
|
| 1047 | ); |
|
| 1048 | } |
|
| 1049 | } else { |
|
| 1050 | EE_Error::add_error( |
|
| @@ 958-962 (lines=5) @@ | ||
| 955 | ); |
|
| 956 | $this->_redirect_after_action(false, '', '', $query_args, true); |
|
| 957 | } |
|
| 958 | if ($errors > 0) { |
|
| 959 | EE_Error::add_error( |
|
| 960 | sprintf(__('There were %d records that did not delete successfully', 'event_espresso'), $errors), |
|
| 961 | __FILE__, |
|
| 962 | __FUNCTION__, |
|
| 963 | __LINE__ |
|
| 964 | ); |
|
| 965 | } else { |
|