Output of index.php?go=triggerSendNotifications not useful/changes

description

Currently, if I wget `index.php?go=triggerSendNotifications` I get a text-only output containing a localized version of the string "%s notifications sent" with possibile variations "One notification sent" and "No notifications sent".
IMHO, there are two problems:
# the reported number of notifications is wrong: the number output is `count($PH->messages);` but `$PH->messages` contains one `FeedbackMessage` object for each person who might have received a notification but did NOT get it because there was nothing to notify, plus one `FeedbackWarning` object for each error while sending the mail. (Unless I'm much mistaken, notifications actually sent are not even counted!)
Currently, if I wget `index.php?go=triggerSendNotifications` I get a text-only output containing a localized version of the string "%s notifications sent" with possibile variations "One notification sent" and "No notifications sent".
IMHO, there are two problems:
# the reported number of notifications is wrong: the number output is `count($PH->messages);` but `$PH->messages` contains one `FeedbackMessage` object for each person who might have received a notification but did NOT get it because there was nothing to notify, plus one `FeedbackWarning` object for each error while sending the mail. (Unless I'm much mistaken, notifications actually sent are not even counted!)
# the output message not suitable for a cron job: human are not expected to be reading this output, OTOH a script might need to parse it in order to propagate warnings to an administrator# the output message is not suitable for a cron job: human are not expected to be reading this output, OTOH a script might need to parse it in order to propagate warnings to an administrator
I have prepared a fix to address the first problem, but in order to address the second problem I would like hear peoples opinion about how the message should be formatted. My opinions are:
# I would avoid localization and variations as they make non-human parsing more complicated
# In case of warnings, the message should contain the text of all warning messages (these messages may be localized, as long as a script is able to detect that they're warnings)
For example, I would stick with:
[code]
Notifications sent: %s // line always present
Warning: %s // one line for each warning if present
[/code]
Comments?
I have prepared a fix to address the first problem, but in order to address the second problem I would like hear peoples opinion about how the message should be formatted. My opinions are:
# I would avoid localization and variations as they make non-human parsing more complicated
# In case of warnings, the message should contain the text of all warning messages (these messages may be localized, as long as a script is able to detect that they're warnings)
For example, I would stick with:
[code]
Notifications sent: %s // line always present
Warning: %s // one line for each warning if present
[/code]
Comments?