Skip to content

Commit

Permalink
Fix #17458: SOAP API does not send e-mails
Browse files Browse the repository at this point in the history
  • Loading branch information
dregad committed Jun 19, 2014
2 parents 4b9dbc4 + f452125 commit a644706
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion api/soap/mantisconnect.php
Expand Up @@ -82,8 +82,15 @@ function mci_is_webservice_call()
require_once( 'mc_core.php' );

$server = new SoapServer("mantisconnect.wsdl",
array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
array('features' => SOAP_USE_XSI_ARRAY_TYPE + SOAP_SINGLE_ELEMENT_ARRAYS)
);

$server->addFunction(SOAP_FUNCTIONS_ALL);
$server->handle();

if( $g_email_stored ) {
if( function_exists( 'fastcgi_finish_request' ) ) {
fastcgi_finish_request();
}
email_send_all();
}
8 changes: 6 additions & 2 deletions core/logging_api.php
Expand Up @@ -151,15 +151,19 @@ function log_event( $p_level, $p_msg ) {
*/
function log_print_to_page() {
if( config_get_global( 'log_destination' ) === 'page' && auth_is_user_authenticated() && access_has_global_level( config_get( 'show_log_threshold' ) ) ) {
global $g_log_events, $g_log_levels;
global $g_log_events, $g_log_levels, $g_email_stored;

if( $g_email_stored ) {
email_send_all();
}

$t_unique_queries_count = 0;
$t_total_query_execution_time = 0;
$t_unique_queries = array();
$t_total_queries_count = 0;
$t_total_event_count = count( $g_log_events );

echo "\n\n<!--Mantis Debug Log Output-->";
echo "\n\n<!--Mantis Debug Log Output-->";
if( $t_total_event_count == 0 ) {
echo "<!--END Mantis Debug Log Output-->\n\n";
return;
Expand Down

0 comments on commit a644706

Please sign in to comment.