diff --git a/doc/CHANGELOG.txt b/doc/CHANGELOG.txt index 361a3dc..a001168 100644 --- a/doc/CHANGELOG.txt +++ b/doc/CHANGELOG.txt @@ -23,6 +23,7 @@ Jul 2016 - EmailReporting-0.9.3-DEV - Test and Complete test now also show location of pear error - Fixed moved functionality concerning reassign_on_feedback - Added extra check whether the given priority exists + - Test and Complete test now always show result Jul 2016 - EmailReporting-0.9.2 - Fixed collation check issue with MantisBT 1.3.x diff --git a/pages/manage_mailbox_edit.php b/pages/manage_mailbox_edit.php index 8dbe021..9a883b0 100644 --- a/pages/manage_mailbox_edit.php +++ b/pages/manage_mailbox_edit.php @@ -59,6 +59,8 @@ } elseif ( ( $f_mailbox_action === 'test' || $f_mailbox_action === 'complete_test' ) && $f_select_mailbox >= 0 ) { + $t_no_redirect = TRUE; + # Verify mailbox - from Recmail by Cas Nuy plugin_require_api( 'core/mail_api.php' ); @@ -69,39 +71,34 @@ $t_is_custom_error = ( ( is_array( $t_result ) && isset( $t_result[ 'ERROR_TYPE' ] ) && $t_result[ 'ERROR_TYPE' ] === 'NON-PEAR-ERROR' ) || ( is_bool( $t_result ) && $t_result === FALSE ) ); - if ( $t_is_custom_error || PEAR::isError( $t_result ) || $f_mailbox_action === 'complete_test' ) - { - $t_no_redirect = TRUE; - - ERP_page_begin( plugin_lang_get( 'plugin_title' ) ); + ERP_page_begin( plugin_lang_get( 'plugin_title' ) ); ?>

'; - - echo plugin_lang_get( 'description' ) . ': ' . $t_mailbox_api->_mailbox[ 'description' ] . '
'; - echo plugin_lang_get( 'mailbox_type' ) . ': ' . $t_mailbox_api->_mailbox[ 'mailbox_type' ] . '
'; - echo plugin_lang_get( 'hostname' ) . ': ', $t_mailbox_api->_mailbox[ 'hostname' ] . '
'; - echo plugin_lang_get( 'port' ) . ': ', $t_mailbox_api->_mailbox[ 'port' ] . '
'; - echo plugin_lang_get( 'encryption' ) . ': ' . $t_mailbox_api->_mailbox[ 'encryption' ] . '
'; - echo plugin_lang_get( 'ssl_cert_verify' ) . ': ' . $t_mailbox_api->_mailbox[ 'ssl_cert_verify' ] . '
'; - echo plugin_lang_get( 'erp_username' ) . ': ' . $t_mailbox_api->_mailbox[ 'erp_username' ] . '
'; - echo plugin_lang_get( 'erp_password' ) . ': ******' . '
'; - echo plugin_lang_get( 'auth_method' ) . ': ' . $t_mailbox_api->_mailbox[ 'auth_method' ] . '
'; - - if ( $t_mailbox_api->_mailbox[ 'mailbox_type' ] === 'IMAP' ) - { - echo plugin_lang_get( 'imap_basefolder' ) . ': ' . $t_mailbox_api->_mailbox[ 'imap_basefolder' ] . '
'; - } - - echo '
' . ( ( $t_is_custom_error ) ? nl2br( $t_result[ 'ERROR_MESSAGE' ] ) : ( ( PEAR::isError( $t_result ) ) ? 'Location: ' . $t_result->ERP_location . '
' . $t_result->toString() : NULL ) ) . '

'; - - print_bracket_link( plugin_page( 'manage_mailbox', TRUE ), lang_get( 'proceed' ) ); + echo plugin_lang_get( ( ( $t_is_custom_error || PEAR::isError( $t_result ) ) ? 'test_failure' : 'test_success' ) ) . '

'; + + echo plugin_lang_get( 'description' ) . ': ' . $t_mailbox_api->_mailbox[ 'description' ] . '
'; + echo plugin_lang_get( 'mailbox_type' ) . ': ' . $t_mailbox_api->_mailbox[ 'mailbox_type' ] . '
'; + echo plugin_lang_get( 'hostname' ) . ': ', $t_mailbox_api->_mailbox[ 'hostname' ] . '
'; + echo plugin_lang_get( 'port' ) . ': ', $t_mailbox_api->_mailbox[ 'port' ] . '
'; + echo plugin_lang_get( 'encryption' ) . ': ' . $t_mailbox_api->_mailbox[ 'encryption' ] . '
'; + echo plugin_lang_get( 'ssl_cert_verify' ) . ': ' . $t_mailbox_api->_mailbox[ 'ssl_cert_verify' ] . '
'; + echo plugin_lang_get( 'erp_username' ) . ': ' . $t_mailbox_api->_mailbox[ 'erp_username' ] . '
'; + echo plugin_lang_get( 'erp_password' ) . ': ******' . '
'; + echo plugin_lang_get( 'auth_method' ) . ': ' . $t_mailbox_api->_mailbox[ 'auth_method' ] . '
'; + + if ( $t_mailbox_api->_mailbox[ 'mailbox_type' ] === 'IMAP' ) + { + echo plugin_lang_get( 'imap_basefolder' ) . ': ' . $t_mailbox_api->_mailbox[ 'imap_basefolder' ] . '
'; + } + + echo '
' . ( ( $t_is_custom_error ) ? nl2br( $t_result[ 'ERROR_MESSAGE' ] ) : ( ( PEAR::isError( $t_result ) ) ? 'Location: ' . $t_result->ERP_location . '
' . $t_result->toString() : NULL ) ) . '

'; + + print_bracket_link( plugin_page( 'manage_mailbox', TRUE ), lang_get( 'proceed' ) ); ?>
= 0 ) ) )