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

CommentFileSizeAuthor
#1 faq_ask.watchdog.patch1.98 KBAnonymous (not verified)

Comments

Anonymous’s picture

Status: Active » Needs review
StatusFileSize
new1.98 KB

(UNTESTED!) Patch attached - I don't have access to a site using faq-ask right at the moment.

nancydru’s picture

Status: Needs review » Fixed

latest from CVS -- 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.

Anonymous’s picture

I apologize - I used HEAD while I tried to create the $body[]-patch - this explains why I haven't found it there ;)

nancydru’s picture

I probably won't update HEAD again until I start the 6->7 upgrade.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.