Dependency Graph | View Issue Relation Graph Horizontal | |||
|
||||
|
View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0015494 | phpList 3 application | Plugin API | public | 27-05-10 18:39 | 16-01-19 09:56 |
Reporter | adrian15 | ||||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0015494: processSuccesFailure is not checked ok on sendemaillib when dealing with plugins | ||||
Description | In sendemailib there is a for loop sentence that checks plugins so that they run their processSuccesFailure function. Currently instead of exiting the loop when a failure has been found the loop continues so that the last plugin success or failure decision prevails. This patch fixes the problem with a while loop sentence so that once a failure has been found it stays as a failure. This is a block issue because it actually disables that a plugin can set an email as a Failure so that is not sent... So... the same email is sent once and once again... Actually in my tests the email was sent twice and with no rss content at all but probably there was something more broken. | ||||
Additional Information | Based on revision 1703. | ||||
Tags | No tags attached. | ||||
27-05-10 18:39
|
G06_plugins_sendemaillib_ProcessSuccesFailure_check_fix.patch (1,568 bytes)
diff -urN rssfixes_G05_rssmanager_sendMessageTabSave_repeatinterval_for_non_rss_emails_fix/lists/admin/sendemaillib.php rssfixes_G06_plugins_sendemaillib_ProcessSuccesFailure_check_fix/lists/admin/sendemaillib.php --- rssfixes_G05_rssmanager_sendMessageTabSave_repeatinterval_for_non_rss_emails_fix/lists/admin/sendemaillib.php 2010-05-17 07:22:28.000000000 +0200 +++ rssfixes_G06_plugins_sendemaillib_ProcessSuccesFailure_check_fix/lists/admin/sendemaillib.php 2010-05-17 07:56:20.000000000 +0200 @@ -761,8 +761,17 @@ if ($htmlpref) { Sql_Query("update {$GLOBALS["tables"]["message"]} set ashtml = ashtml + 1 where id = $messageid"); + $processSuccesFailure=1; # Let's suppose that processSucessFailure is going to be true + foreach ($GLOBALS['plugins'] as $plugin) { - $plugin->processSuccesFailure ($messageid, 'ashtml', $userdata); + if ($plugin->iWantToProcess($cached[$messageid],$userdata)) { + reset($GLOBALS['plugins']); + while ($processSuccesFailure && $pluginWhile = current($GLOBALS['plugins']) ) { + $processSuccesFailure = $pluginWhile->processSuccesFailure ($messageid, 'ashtml', $userdata); + next($GLOBALS['plugins']); + } + # This is a hack so that whenever a plugin marks a message as Failure it is Failure and another plugin does not set is back to Succes. adrian15 . Useful for rss + } } $mail->add_html($htmlmessage,"",$cached[$messageid]["templateid"]); // if (ENABLE_RSS && sizeof($rssitems)) //Obsolete by rssmanager plugin |
|
I deprecated the call. It's unclear what it does, and even if it does something, it does it very clumsily. https://github.com/phpList/phplist3/commit/8297d9614322319996bd58d4367ccd01b7d2c98f |