Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
node system
Priority:
Minor
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
28 Nov 2006 at 14:30 UTC
Updated:
18 Dec 2006 at 11:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
pwolanin commentedWhy not just pass in the nid rather than the whole node?
Also, I think your patch may break other code, since you no longer look to arg(1). I think in most cases the nid is coming from there, rather than from $_POST.
Comment #2
hickory commentedQuite the opposite actually - it's only called from the 'node/nid' URL, and takes $nid from arg(1), not from the form.
Comment #3
pwolanin commentedAhhh, sorry I just looked at the full node_menu() function. Now I see that the node is loaded and available.
Actually I'm now wondering why all the calls to arg(1) in this function aren't replaced with $node->nid?
Also, in terms of the access control your approach may be fine, since it's similar to this: http://drupal.org/node/83288
Comment #4
edmund.kwok commented+1 for removal of $_POST.
Node delete still works fine after patch. Rerolled for HEAD; changed slight coding style to match most of other modules in core. RTBC for me.
Comment #5
dries commentedGood work guys! Committed to CVS HEAD. Keep the patches coming. :)
Comment #6
(not verified) commented