Download & Extend

nodequeue_load_x functions should return data in a uniform format

Project:Nodequeue
Version:6.x-2.0
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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

Comments

#1

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

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?

#2

Status:active» needs review

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

AttachmentSizeStatusTest resultOperations
nodequeue-446452-2.patch1.14 KBIgnored: Check issue status.NoneNone

#3

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!

#4

Thanks Ezra.

#5

Status:fixed» closed (fixed)

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

nobody click here