[drupal-devel] node_load() change in HEAD
In HEAD, node_load() changed. You can now write: node_load($nid); instead of having to write: node_load(array('nid' => $nid)); Slightly less code, slightly less memory, slightly faster. -- Dries Buytaert :: http://www.buytaert.net/
But does, e.g. node_load(array('title'=>'this is a node')) still work too? Op woensdag 20 juli 2005 13:36, schreef Karoly Negyesi:
On Wednesday 20 July 2005 13:33, Dries Buytaert wrote:
In HEAD, node_load() changed. You can now write:
There is a bit more: you now SHOULD write
node_load($nid);
if you want node_load to cache.
Regards
Karoly Negyesi Regards, Bèr -- [ Bèr Kessels | Drupal services www.webschuur.com ]
On Saturday 23 July 2005 10:14, Bèr Kessels wrote:
But does, e.g. node_load(array('title'=>'this is a node')) still work too?
Sure it does. The first parameter is mixed -- it can be an array of conditions or a nid.
There is a bit more: you now SHOULD write
node_load($nid);
if you want node_load to cache.
I will write a patch to revert this, so node_load(array('nid' => $nid)) will cache again very soon. Regards NK
participants (3)
-
Bèr Kessels -
Dries Buytaert -
Karoly Negyesi