[drupal-devel] [feature] Allow node_load($nid)

clydefrog drupal-devel at drupal.org
Fri Jul 15 05:10:38 UTC 2005


Issue status update for 
http://drupal.org/node/25634
Post a follow up: 
http://drupal.org/project/comments/add/25634

 Project:      Drupal
 Version:      cvs
 Component:    node system
 Category:     feature requests
 Priority:     normal
 Assigned to:  chx
 Reported by:  chx
 Updated by:   clydefrog
 Status:       patch

I like this! Is there a similar issue for user_load()?




clydefrog



Previous comments:
------------------------------------------------------------------------

June 23, 2005 - 11:37 : chx

Attachment: http://drupal.org/files/issues/node_load.patch (2.23 KB)

I am fed up writing node_load(array('nid' => $nid)) all the time.


BTW. if this is accepted, next is node_view to accept a $nid.




------------------------------------------------------------------------

June 23, 2005 - 11:41 : chx

Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB)




------------------------------------------------------------------------

June 23, 2005 - 11:53 : adrian

I am going to +1 this.


node_load(x) is much more natural to type. Having it use an array if
found is useful too though.




------------------------------------------------------------------------

July 1, 2005 - 10:00 : chx

Attachment: http://drupal.org/files/issues/node_load_1.patch (27.89 KB)

Dries, if I remember correctly, you favoured this approach.




------------------------------------------------------------------------

July 1, 2005 - 10:07 : chx

Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB)

PHPdoc.




------------------------------------------------------------------------

July 1, 2005 - 10:14 : Jose A Reyero

+1
It's not only about lazy developers -which I am ;-)- it's also about
shorter code => less errors, easier to catch




------------------------------------------------------------------------

July 1, 2005 - 10:17 : chx

The patch and its consequences makes me love the version at
http://drupal.org/node/25634#comment-33584 more, but Dries will be the
one to decide.




------------------------------------------------------------------------

July 1, 2005 - 10:31 : chx

Attachment: http://drupal.org/files/issues/node_load_3.patch (18.95 KB)

A few things slipped in from another patch which should not be here.




------------------------------------------------------------------------

July 1, 2005 - 10:33 : chx

Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB)

Same problem as above.







More information about the drupal-devel mailing list