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

jeremy’s picture

Assigned: Unassigned » jeremy

To review.

avpaderno’s picture

A 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().

jeremy’s picture

Status: Active » Fixed

Easier 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.

avpaderno’s picture

Actually, drupal_add_js() existed before Drupal 6; _drupal_add_js() was simply the helper function used from drupal_add_js().

Status: Fixed » Closed (fixed)

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