Hi

I'm curious why nodequeue_load_front and nodequeue_load_back return an array of nodes rather than a single node as there can only be one node at the front or back. nodequeue_load_random_node does return a single node. It took me a while to work out why I wasn't getting the expected result but the random option worked fine.

thanks

Martin

CommentFileSizeAuthor
#2 nodequeue-446452-2.patch1.14 KBAnonymous (not verified)
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ezra-g’s picture

Title: Returning array rather than single node » nodequeue_load_x functions should return data in a uniform format
Category: support » bug

That's a good point -- I'd like to see them return the single node object, not inside a useless array. The fix should be pretty simple. Would you like to submit a patch?

Anonymous’s picture

Status: Active » Needs review
FileSize
1.14 KB

First time for everything...patch submitted. Wasn't that scary!

Changed:
nodequeue_load_front
nodequeue_load_back
nodequeue_view_random_node

all now return a single object rather than array for consistency with nodequeue_load_random_node

ezra-g’s picture

Status: Needs review » Fixed

Congratulations on your first patch. This is applied. I credited you in the commit message.

I'll highlight this change in the release notes so developers don't get thrown off.

Thanks!

Anonymous’s picture

Thanks Ezra.

Status: Fixed » Closed (fixed)

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