{"push_id":623522401,"size":6,"distinct_size":6,"ref":"refs/heads/master","head":"83a66f1187a23e63f8418c6312c46556e75b2f88","before":"4900fd88e9d0b18ebeb0e1c53e23dd73201b1b84","commits":[{"sha":"bc34c9708be7dccaeec0e3eecb18d5606cd08491","author":{"email":"d9b599957bd54c22143053c16557076ca2185dbd@mantisbt.org","name":"Damien Regad"},"message":"Whitespace","distinct":true,"url":"https://api.github.com/repos/mantisbt/mantisbt/commits/bc34c9708be7dccaeec0e3eecb18d5606cd08491"},{"sha":"9c45e1468a15d76e0ee23622c725361a07bc85fb","author":{"email":"d9b599957bd54c22143053c16557076ca2185dbd@mantisbt.org","name":"Damien Regad"},"message":"Synchronous email sending via shutdown function\n\nMantis provides 2 ways of processing email: synchronously (default) or\nusing a cron job. Historically, the former was achieved by processing\nthe email queue immediately after each email-generating action.\n\nThis approach could lead to a severe performance degradation when the\nqueue contains a backlog of pending messages which can't be sent (e.g.\ndue to invalid email addresses or server problems).\n\nIn early 2014, an attempt was made to improve this for fastcgi by\nprocessing the queue at the bottom of each displayed page (in html_end()\nfunction), which introduced regressions for SOAP API (issue #17458) as\nwell as plugins and other corner cases (issues #17460).\n\nThis commit resolves the problem by registering a shutdown function to\nprocess the email queue in core.php, which ensures that email gets sent\nno matter what.\n\nTo avoid multiple executions of the shutdown function for a single user\nrequest (which may lead to several executions of core.php, e.g. when\nbuilding dynamic css, javascript translations, etc), an arbitrary 5\nseconds delay is observed between each register_shutdown_function()\ncall.\n\nFixes #17460","distinct":true,"url":"https://api.github.com/repos/mantisbt/mantisbt/commits/9c45e1468a15d76e0ee23622c725361a07bc85fb"},{"sha":"ffeb73c83aca26f4afab98b6548b9f331b604744","author":{"email":"d9b599957bd54c22143053c16557076ca2185dbd@mantisbt.org","name":"Damien Regad"},"message":"Remove useless 'echo' statement","distinct":true,"url":"https://api.github.com/repos/mantisbt/mantisbt/commits/ffeb73c83aca26f4afab98b6548b9f331b604744"},{"sha":"ca7d087acd0b5189c1cb68017acf49d0b0157957","author":{"email":"d9b599957bd54c22143053c16557076ca2185dbd@mantisbt.org","name":"Damien Regad"},"message":"Refactor the email shutdown function\n\nRegister email_shutdown_function() from a new generic helper API,\nmantis_shutdown_functions_register(); this could be used to add other\nshutdown functions or a plugin event in the future.\n\nThe shutdown function is now always registered, and the logic to\ndetermine whether to call email_send_all() or not has been moved into\nit. This allows removal of the delay implemented in the previous\nversion to avoid concurrent executions.\n\nThe $g_email_stored global variable has been renamed and is now used as\na binary flag which drives the shutdown function's behavior. By setting\nthis flag, the request can\n- indicate that emails have been generated, allowing the shutdown\n  function to trigger email_send_all() only when necessary\n- force sending of emails in the shutdown function, regardless of\n  $g_email_send_using_cronjob setting (useful e.g. for signup or\n  password reset processes, where we don't want to delay notifications).\n\nTo implement that behavior, a new optional parameter ($p_force) was\nadded to the email_store() function.\n\nThese changes are derived from vboctor's comments in PR 589.\n\nIssue #17460","distinct":true,"url":"https://api.github.com/repos/mantisbt/mantisbt/commits/ca7d087acd0b5189c1cb68017acf49d0b0157957"},{"sha":"037b99a562dc903cb7ca001179aeba2a12d13947","author":{"email":"d9b599957bd54c22143053c16557076ca2185dbd@mantisbt.org","name":"Damien Regad"},"message":"email_store() should always set EMAIL_SHUTDOWN_GENERATED flag\n\nEven though the code in email_shutdown_function() handles the\nEMAIL_SHUTDOWN_FORCE flag as though EMAIL_SHUTDOWN_GENERATED were also\nset, it is technically more correct to always set the flag.\n\nIssue #17460","distinct":true,"url":"https://api.github.com/repos/mantisbt/mantisbt/commits/037b99a562dc903cb7ca001179aeba2a12d13947"},{"sha":"83a66f1187a23e63f8418c6312c46556e75b2f88","author":{"email":"d9b599957bd54c22143053c16557076ca2185dbd@mantisbt.org","name":"Damien Regad"},"message":"Synchronous email sending via shutdown function\n\nPull request https://github.com/mantisbt/mantisbt/pull/589","distinct":true,"url":"https://api.github.com/repos/mantisbt/mantisbt/commits/83a66f1187a23e63f8418c6312c46556e75b2f88"}]}