API page: http://api.drupal.org/api/drupal/modules--node--node.module/function/nod...
Describe the problem you have found:
I don't believe it's a problem with the documentation so much as the function. I would expect the node_get_recent function to return the most recently created content. Instead, it appears to return the most recently updated.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | node_get_recent_doc_revision-1181576-4695528.patch | 492 bytes | James_Stallings |
Comments
Comment #1
aspilicious commentedWe fix bugs first in 8.x
This is a documentation issue.
Comment #2
jhodgdonDefinitely a doc issue.
The query definitely returns nodes ordered by n.changed (the last changed time). Should be documented in the function one-line doc header, which currently says "Find the most recent nodes that are available to the current user." -- which indeed doesn't clarify what "recent" means.
Comment #3
jhodgdonProbably a good one for a novice doc contributor to take on...
Comment #4
James_Stallings commentedNovice contributor here. Looking for an endorsement before I proceed creating a patch.
Change the document header
From: Find the most recent nodes that are available to the current user.
To: Find the most recently changed nodes that are available to the current user.
Comment #5
jhodgdonThat looks mostly good. But as long as we are fixing this function, we should also bring the doc header up to standards:
http://drupal.org/node/1354
Namely, the one-sentence description should start with "Finds", not "Find".
Thanks!
Comment #6
James_Stallings commentedIn progress
Comment #7
James_Stallings commentedComment #8
jhodgdonLooks good to me -- congratulations on your first patch (or one of your first few anyway)!
8.x/7.x please... This function doesn't exist in 6.x under this name anyway, so that should do it.
Comment #9
webchickGreat job, James! Thanks! :)
Committed and pushed to 8.x and 7.x.