Closed (fixed)
Project:
Services
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2011 at 15:24 UTC
Updated:
19 May 2011 at 17:01 UTC
Jump to comment: Most recent file
Attached patch converts the nodeFiles action from the file resource into a relationship on the node resource. Will be following up with the same for loadNodeComments most likely.
More API changes ftw.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | 1051158.patch | 6.12 KB | gdd |
| #4 | 1051158.patch | 6.19 KB | gdd |
| #1 | 1051158.patch | 6.3 KB | gdd |
Comments
Comment #1
gddHere it is. Also fixes a bug in the old file resource when the field existed but had no uploads.
Comment #2
kylebrowning commentedWorks great, commit it!
Comment #3
voxpelli commentedSome feedback:
Different access method than for the old callback - is this intentional?
Why not optional?
Put this outside of the foreach loop?
I understand that this comes from the old function - but why are we returning an error code when no files are present? An empty response with a 2xx code should be returned instead I think - but perhaps such a change should be made in another patch?
Powered by Dreditor.
Comment #4
gdd1) In normal Drupal functioning, whether or not you can view a node's files is controlled by whether or not you can view the node. So I thought it made more sense this way.
2) Fixed
3) Fixed
4) Concur, just review a blank array now.
Nice catches!
Comment #5
gddHere is another reroll with the include removed from the outer loop as well as the inner one
Comment #6
kylebrowning commentedTested this morning, looks good.
Comment #7
gddOK this is committed, switching to 6.x for backport
Comment #8
kylebrowning commented