Closed (fixed)
Project:
Nodequeue
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Mar 2011 at 17:20 UTC
Updated:
20 May 2011 at 09:31 UTC
Jump to comment: Most recent file
Comments
Comment #1
gregglesComment #2
gregglesLet's try again.
Comment #3
ezra-g commentedAs long as we've already loaded the queue and subqueue objects, any reason not to pass them in the hook definition?
Comment #4
gregglesSure, makes sense.
Comment #5
ezra-g commentedSeems RTBC to me. Thanks!
Comment #6
gregglesActually we could/should call this after nodequeue has done it's work. That way other modules can get involved
1) To do their own processing which might be important for some other reason (like saving where the locks are)
2) They can also change the order around as necessary.
Comment #7
gregglesThis patch provides that feature I mentioned.
It also lets modules modify the subqueue re-ordering form by adding elements and then passes those along to any module that implements the new nodequeue_save_subqueue_order_alter.
It maintains API consistency for all the current hooks in this area.
I'm calling the new "hook" in a somewhat non-standard way that allows for passing the $nodes by reference. This is actually the new standard way to do it that works with PHP 4.x through 5.3 without throwing errors.
One odd detail to this change:
I found with the new practice of including the row data that the comparison had to be "regular" which means that it didn't cast types to something before doing the comparison.
Comment #8
amateescu commentedNow this is a great patch! Commited to 6.x and 7.x.
http://drupalcode.org/project/nodequeue.git/commit/e841ebe
http://drupalcode.org/project/nodequeue.git/commit/cbafd7c
Attached is the patch that was commited to 7.x.