I have a suggestion that would improve pingback, when it is being used in conjunction with the scheduler module. Currently the weight of both modules is not changed from the default zero, so during a cron run, pingback is executed before scheduler (I believe this is because P comes before S in the alphabet). This means that if scheduler publishes content which would create a pingback then the ping is not sent until the next cron run. If the weight of the pingback module was set to be heavier than that of scheduler then the pingback would be sent during the same cron run as when the content is published.

I think that all you need to do is add the following code to pingback's hook_install()

  $weight = (int)db_result(db_query("SELECT weight FROM {system} WHERE name = 'scheduler'"));
  db_query("UPDATE {system} SET weight = %d WHERE name = 'pingback'", $weight + 10);

If scheduler is not installed then the above will just set the pingback weight to 10.
What do you think?

Jonathan

CommentFileSizeAuthor
#1 _pingback.install.patch.txt506 bytesjonathan1055
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jonathan1055’s picture

Status: Active » Needs review
FileSize
506 bytes

I have created a patch file for the above proposed enhancement, to make it easy for it to be applied to the current dev release 2.x

Jonathan

andreashaugstrup’s picture

Status: Needs review » Fixed

Committed to HEAD. Thank you jonathan!

Status: Fixed » Closed (fixed)

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