@@ 900-919 (lines=20) @@ | ||
897 | } else { |
|
898 | //can count how many sent by using the messages in the queue |
|
899 | $sent_count = $sent_queue->count_STS_in_queue( EEM_Message::instance()->stati_indicating_sent() ); |
|
900 | if ( $sent_count > 0 ) { |
|
901 | EE_Error::add_success( |
|
902 | sprintf( |
|
903 | _n( |
|
904 | 'There was %d message successfully sent.', |
|
905 | 'There were %d messages successfully sent.', |
|
906 | $sent_count, |
|
907 | 'event_espresso' |
|
908 | ), |
|
909 | $sent_count |
|
910 | ) |
|
911 | ); |
|
912 | } else { |
|
913 | EE_Error::overwrite_errors(); |
|
914 | EE_Error::add_error( |
|
915 | __( '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. |
|
916 | If there was an error, you can look at the messages in the message activity list table for any error messages.', 'event_espresso' ), |
|
917 | __FILE__, __FUNCTION__, __LINE__ |
|
918 | ); |
|
919 | } |
|
920 | } |
|
921 | return $sent_queue; |
|
922 | } |
|
@@ 943-960 (lines=18) @@ | ||
940 | ||
941 | //get queue and count |
|
942 | $queue_count = self::$_MSG_PROCESSOR->get_queue()->count_STS_in_queue( EEM_Message::status_resend ); |
|
943 | if ( $queue_count > 0 ) { |
|
944 | EE_Error::add_success( |
|
945 | sprintf( |
|
946 | _n( |
|
947 | '%d message successfully queued for resending.', |
|
948 | '%d messages successfully queued for resending.', |
|
949 | $queue_count, |
|
950 | 'event_espresso' |
|
951 | ), |
|
952 | $queue_count |
|
953 | ) |
|
954 | ); |
|
955 | } else { |
|
956 | EE_Error::add_error( |
|
957 | __( '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.', 'event_espresso' ), |
|
958 | __FILE__, __FUNCTION__, __LINE__ |
|
959 | ); |
|
960 | } |
|
961 | return (bool) $queue_count; |
|
962 | } |
|
963 |
@@ 820-824 (lines=5) @@ | ||
817 | $this->_redirect_after_action( FALSE, '', '', $query_args, TRUE ); |
|
818 | } |
|
819 | ||
820 | if ( $errors > 0 ) { |
|
821 | EE_Error::add_error( sprintf( __('There were %d records that did not delete successfully', 'event_espresso'), $errors ), __FILE__, __FUNCTION__, __LINE__ ); |
|
822 | } else { |
|
823 | EE_Error::add_success( __('Records were successfully deleted', 'event_espresso') ); |
|
824 | } |
|
825 | ||
826 | $this->_redirect_after_action( FALSE, '', '', $query_args, TRUE ); |
|
827 | } |