Setting up an image based ad to use jquery I ran into a problem with a call to _drupal_add_js on line 210 of ad.module.
This function no longer exists under Drupal 6. It should probably be a call to drupal_add_js instead, which still exists.
Actually, there's a query whether this code is needed at all since D6 has jquery, but in any case, changing the call gets rid of the immediate error.
Comments
Comment #1
jeremy commentedTo review.
Comment #2
avpadernoA module should not call a Drupal function whose name starts with _, if not in very exceptional cases.
In the specific case, there is not reason to not use
drupal_add_js().Comment #3
jeremy commentedEasier said than done! I've been breaking that rule for about eight years now, and old habits are the hardest to break... ;) I'm sure the reason this function was renamed from _drupal_add_js() to drupal_add_js() is because other modules were calling it, too.
In any case, patch committed.
Comment #4
avpadernoActually,
drupal_add_js()existed before Drupal 6;_drupal_add_js()was simply the helper function used fromdrupal_add_js().