hook_nodequeue_sort_alter() is clearly meant to be able to alter the $nodes when their order is being changed, given its hook name. However, it can't:

  module_invoke_all('nodequeue_sort_alter', $sqid, $nodes);

Presumably, module_invoke_all() can't pass by reference. Hence anything I do to $nodes in foo_nodequeue_sort_alter() has no effect, and the hook is pointless.

This needs drupal_alter, and the thing to be altered needs to go first:

  drupal_alter('nodequeue_sort', $nodes, $sqid);
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

Status: Active » Needs review
FileSize
613 bytes

Don't know if this will fly, as the parameters must be reversed. However, given the hook currently is useless, I doubt anyone has implemented it...

amateescu’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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