I believe that according to http://api.drupal.org/api/function/watchdog/6 the watchdog calls in FAQ_ASK are wrong (Drupal5-format not Drupal6).
See example (faq_ask.module, line 393ff - latest from CVS)
if ($mail_sent) {
watchdog('FAQ_Ask', t('Expert notification email sent.') .' '. $to, WATCHDOG_NOTICE);
}
should perhaps be
if ($mail_sent) {
watchdog('FAQ_Ask', t('Expert notification email sent.') .' '. $to, null, WATCHDOG_NOTICE);
}
The above change does not incorporate the possibility of watchdog translating automatically, though the call to t() could be avoided:
if ($mail_sent) {
watchdog('FAQ_Ask', t('Expert notification email sent. %to'), array('%to'=>$to), WATCHDOG_NOTICE);
}
Related problems can be found throughout the code.
BEGIN UNRELATED RANT
I would agree that it is a *** API-change, as a compatible API-change would have been possible without any loss, damage or additional work; changing an API just to change it is kind of ..
e.g. use watchdog($type, $message, $severity = WATCHDOG_NOTICE, $link = NULL, $variables=array())
This is one of the reasons why PHP supports optional parameters.
END UNRELATED RANT
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | faq_ask.watchdog.patch | 1.98 KB | Anonymous (not verified) |
Comments
Comment #1
Anonymous (not verified) commented(UNTESTED!) Patch attached - I don't have access to a site using faq-ask right at the moment.
Comment #2
nancydru-- Did you pull from HEAD or DRUPAL-6--1? These lines were changed long ago. I do not use HEAD, so whatever is there is really old, and probably left over from the 5->6 conversion.
Comment #3
Anonymous (not verified) commentedI apologize - I used HEAD while I tried to create the $body[]-patch - this explains why I haven't found it there ;)
Comment #4
nancydruI probably won't update HEAD again until I start the 6->7 upgrade.