[drupal-devel] [feature] Allow node_load($nid)
Issue status update for http://drupal.org/node/25634 Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch 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. chx
Issue status update for http://drupal.org/node/25634 Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) chx Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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.
Issue status update for http://drupal.org/node/25634 Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: adrian Status: patch 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. adrian Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 20:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB)
+1 And to save time, +1 for node_view($nid) too. On 6/23/05, chx <drupal-devel@drupal.org> wrote:
Issue status update for http://drupal.org/node/25634
Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch 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.
chx
Issue status update for http://drupal.org/node/25634 Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/node_load_1.patch (27.89 KB) Dries, if I remember correctly, you favoured this approach. chx Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 20:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 20: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.
Issue status update for http://drupal.org/node/25634 Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. chx Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 20:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 19:00 : chx Attachment: http://drupal.org/files/issues/node_load_1.patch (27.89 KB) Dries, if I remember correctly, you favoured this approach.
Issue status update for http://drupal.org/node/25634 Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: Jose A Reyero Status: patch +1 It's not only about lazy developers -which I am ;-)- it's also about shorter code => less errors, easier to catch Jose A Reyero Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 19: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 - 19:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 19: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 - 18: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 - 18:07 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc.
Issue status update for http://drupal.org/node/25634 Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch 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. chx Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 20:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 19: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 - 19:07 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ July 1, 2005 - 19: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
Issue status update for http://drupal.org/node/25634 Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch 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. chx Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 20:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 19: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 - 19:07 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ July 1, 2005 - 19: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 - 19: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.
Issue status update for http://drupal.org/node/25634 Project: Drupal Version: cvs Component: node system Category: feature requests Priority: normal Assigned to: chx Reported by: chx Updated by: chx Status: patch Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB) Same problem as above. chx Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 20:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 19: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 - 19:07 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ July 1, 2005 - 19: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 - 19: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 - 19: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.
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.
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: Steven Status: patch I definitely prefer the version where we simply allow $conditions to be passed as an integer, rather than introducing additional parameters. It matches PHP's convention of having "mixed" argument types for some functions for shorthands (e.g. str_replace allows array arguments to compact multiple replacements in one statement). And not unimportant: it does not break backwards compatibility for what it essentially syntactic sugar. Steven Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 20:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 19: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 - 19:07 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ July 1, 2005 - 19: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 - 19: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 - 19: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 - 19:33 : chx Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB) Same problem as above. ------------------------------------------------------------------------ July 15, 2005 - 07:10 : clydefrog I like this! Is there a similar issue for user_load()?
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: chx Status: patch Steven. Dries did not like that version hence the additional parameter. Dries, now that even Steven is on my side, would you please reconsider :) ? chx Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 20:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 19: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 - 19:07 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ July 1, 2005 - 19: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 - 19: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 - 19: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 - 19:33 : chx Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB) Same problem as above. ------------------------------------------------------------------------ July 15, 2005 - 07:10 : clydefrog I like this! Is there a similar issue for user_load()? ------------------------------------------------------------------------ July 16, 2005 - 08:33 : Steven I definitely prefer the version where we simply allow $conditions to be passed as an integer, rather than introducing additional parameters. It matches PHP's convention of having "mixed" argument types for some functions for shorthands (e.g. str_replace allows array arguments to compact multiple replacements in one statement). And not unimportant: it does not break backwards compatibility for what it essentially syntactic sugar.
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: adrian Status: patch I concurr about the mixed parameter. adrian Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 20:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 20: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 - 19: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 - 19:07 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ July 1, 2005 - 19: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 - 19: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 - 19: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 - 19:33 : chx Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB) Same problem as above. ------------------------------------------------------------------------ July 15, 2005 - 07:10 : clydefrog I like this! Is there a similar issue for user_load()? ------------------------------------------------------------------------ July 16, 2005 - 08:33 : Steven I definitely prefer the version where we simply allow $conditions to be passed as an integer, rather than introducing additional parameters. It matches PHP's convention of having "mixed" argument types for some functions for shorthands (e.g. str_replace allows array arguments to compact multiple replacements in one statement). And not unimportant: it does not break backwards compatibility for what it essentially syntactic sugar. ------------------------------------------------------------------------ July 16, 2005 - 09:58 : chx Steven. Dries did not like that version hence the additional parameter. Dries, now that even Steven is on my side, would you please reconsider :) ?
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: walkah Status: patch let me weigh in +1 on the mixed parameter side ... let's get away from blowing up backwards compatibility unless it's justified and/or unavoidable for the sake of progress. please :) walkah Previous comments: ------------------------------------------------------------------------ June 23, 2005 - 13: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 - 13:41 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ June 23, 2005 - 13: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 - 12: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 - 12:07 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ July 1, 2005 - 12: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 - 12: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 - 12: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 - 12:33 : chx Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB) Same problem as above. ------------------------------------------------------------------------ July 15, 2005 - 00:10 : clydefrog I like this! Is there a similar issue for user_load()? ------------------------------------------------------------------------ July 16, 2005 - 01:33 : Steven I definitely prefer the version where we simply allow $conditions to be passed as an integer, rather than introducing additional parameters. It matches PHP's convention of having "mixed" argument types for some functions for shorthands (e.g. str_replace allows array arguments to compact multiple replacements in one statement). And not unimportant: it does not break backwards compatibility for what it essentially syntactic sugar. ------------------------------------------------------------------------ July 16, 2005 - 02:58 : chx Steven. Dries did not like that version hence the additional parameter. Dries, now that even Steven is on my side, would you please reconsider :) ? ------------------------------------------------------------------------ July 16, 2005 - 04:01 : adrian I concurr about the mixed parameter.
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: chx Status: patch Attachment: http://drupal.org/files/issues/nodeload.patch (15.46 KB) chx Previous comments: ------------------------------------------------------------------------ 1119551855 : 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. ------------------------------------------------------------------------ 1119552118 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ 1119552818 : 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. ------------------------------------------------------------------------ 1120237219 : chx Attachment: http://drupal.org/files/issues/node_load_1.patch (27.89 KB) Dries, if I remember correctly, you favoured this approach. ------------------------------------------------------------------------ 1120237631 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ 1120238082 : 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 ------------------------------------------------------------------------ 1120238246 : 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. ------------------------------------------------------------------------ 1120239063 : 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. ------------------------------------------------------------------------ 1120239220 : chx Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB) Same problem as above. ------------------------------------------------------------------------ 1121404235 : clydefrog I like this! Is there a similar issue for user_load()? ------------------------------------------------------------------------ 1121495601 : Steven I definitely prefer the version where we simply allow $conditions to be passed as an integer, rather than introducing additional parameters. It matches PHP's convention of having "mixed" argument types for some functions for shorthands (e.g. str_replace allows array arguments to compact multiple replacements in one statement). And not unimportant: it does not break backwards compatibility for what it essentially syntactic sugar. ------------------------------------------------------------------------ 1121500736 : chx Steven. Dries did not like that version hence the additional parameter. Dries, now that even Steven is on my side, would you please reconsider :) ? ------------------------------------------------------------------------ 1121504460 : adrian I concurr about the mixed parameter. ------------------------------------------------------------------------ 1121518557 : walkah let me weigh in +1 on the mixed parameter side ... let's get away from blowing up backwards compatibility unless it's justified and/or unavoidable for the sake of progress. please :)
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: chx Status: patch Attachment: http://drupal.org/files/issues/nodeload_0.patch (18.98 KB) poor book module remained unpatched. chx Previous comments: ------------------------------------------------------------------------ 1119551855 : 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. ------------------------------------------------------------------------ 1119552118 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ 1119552818 : 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. ------------------------------------------------------------------------ 1120237219 : chx Attachment: http://drupal.org/files/issues/node_load_1.patch (27.89 KB) Dries, if I remember correctly, you favoured this approach. ------------------------------------------------------------------------ 1120237631 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ 1120238082 : 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 ------------------------------------------------------------------------ 1120238246 : 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. ------------------------------------------------------------------------ 1120239063 : 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. ------------------------------------------------------------------------ 1120239220 : chx Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB) Same problem as above. ------------------------------------------------------------------------ 1121404235 : clydefrog I like this! Is there a similar issue for user_load()? ------------------------------------------------------------------------ 1121495601 : Steven I definitely prefer the version where we simply allow $conditions to be passed as an integer, rather than introducing additional parameters. It matches PHP's convention of having "mixed" argument types for some functions for shorthands (e.g. str_replace allows array arguments to compact multiple replacements in one statement). And not unimportant: it does not break backwards compatibility for what it essentially syntactic sugar. ------------------------------------------------------------------------ 1121500736 : chx Steven. Dries did not like that version hence the additional parameter. Dries, now that even Steven is on my side, would you please reconsider :) ? ------------------------------------------------------------------------ 1121504460 : adrian I concurr about the mixed parameter. ------------------------------------------------------------------------ 1121518557 : walkah let me weigh in +1 on the mixed parameter side ... let's get away from blowing up backwards compatibility unless it's justified and/or unavoidable for the sake of progress. please :) ------------------------------------------------------------------------ 1121623645 : chx Attachment: http://drupal.org/files/issues/nodeload.patch (15.46 KB)
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: chx Status: patch Attachment: http://drupal.org/files/issues/nodeload_1.patch (18.15 KB) wrong version. chx Previous comments: ------------------------------------------------------------------------ 1119551855 : 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. ------------------------------------------------------------------------ 1119552118 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ 1119552818 : 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. ------------------------------------------------------------------------ 1120237219 : chx Attachment: http://drupal.org/files/issues/node_load_1.patch (27.89 KB) Dries, if I remember correctly, you favoured this approach. ------------------------------------------------------------------------ 1120237631 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ 1120238082 : 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 ------------------------------------------------------------------------ 1120238246 : 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. ------------------------------------------------------------------------ 1120239063 : 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. ------------------------------------------------------------------------ 1120239220 : chx Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB) Same problem as above. ------------------------------------------------------------------------ 1121404235 : clydefrog I like this! Is there a similar issue for user_load()? ------------------------------------------------------------------------ 1121495601 : Steven I definitely prefer the version where we simply allow $conditions to be passed as an integer, rather than introducing additional parameters. It matches PHP's convention of having "mixed" argument types for some functions for shorthands (e.g. str_replace allows array arguments to compact multiple replacements in one statement). And not unimportant: it does not break backwards compatibility for what it essentially syntactic sugar. ------------------------------------------------------------------------ 1121500736 : chx Steven. Dries did not like that version hence the additional parameter. Dries, now that even Steven is on my side, would you please reconsider :) ? ------------------------------------------------------------------------ 1121504460 : adrian I concurr about the mixed parameter. ------------------------------------------------------------------------ 1121518557 : walkah let me weigh in +1 on the mixed parameter side ... let's get away from blowing up backwards compatibility unless it's justified and/or unavoidable for the sake of progress. please :) ------------------------------------------------------------------------ 1121623645 : chx Attachment: http://drupal.org/files/issues/nodeload.patch (15.46 KB) ------------------------------------------------------------------------ 1121624254 : chx Attachment: http://drupal.org/files/issues/nodeload_0.patch (18.98 KB) poor book module remained unpatched.
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: stefan nagtegaal Status: patch I thought this had hit the trunk some days ago.. Chx, can you or Dries confirm and mark this issue as "Fixed"? stefan nagtegaal Previous comments: ------------------------------------------------------------------------ Thu, 23 Jun 2005 18:37:35 +0000 : 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. ------------------------------------------------------------------------ Thu, 23 Jun 2005 18:41:58 +0000 : chx Attachment: http://drupal.org/files/issues/node_load_0.patch (2.23 KB) ------------------------------------------------------------------------ Thu, 23 Jun 2005 18:53:38 +0000 : 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. ------------------------------------------------------------------------ Fri, 01 Jul 2005 17:00:19 +0000 : chx Attachment: http://drupal.org/files/issues/node_load_1.patch (27.89 KB) Dries, if I remember correctly, you favoured this approach. ------------------------------------------------------------------------ Fri, 01 Jul 2005 17:07:11 +0000 : chx Attachment: http://drupal.org/files/issues/node_load_2.patch (27.97 KB) PHPdoc. ------------------------------------------------------------------------ Fri, 01 Jul 2005 17:14:42 +0000 : 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 ------------------------------------------------------------------------ Fri, 01 Jul 2005 17:17:26 +0000 : 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. ------------------------------------------------------------------------ Fri, 01 Jul 2005 17:31:03 +0000 : 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. ------------------------------------------------------------------------ Fri, 01 Jul 2005 17:33:40 +0000 : chx Attachment: http://drupal.org/files/issues/node_load_4.patch (15.31 KB) Same problem as above. ------------------------------------------------------------------------ Fri, 15 Jul 2005 05:10:35 +0000 : clydefrog I like this! Is there a similar issue for user_load()? ------------------------------------------------------------------------ Sat, 16 Jul 2005 06:33:21 +0000 : Steven I definitely prefer the version where we simply allow $conditions to be passed as an integer, rather than introducing additional parameters. It matches PHP's convention of having "mixed" argument types for some functions for shorthands (e.g. str_replace allows array arguments to compact multiple replacements in one statement). And not unimportant: it does not break backwards compatibility for what it essentially syntactic sugar. ------------------------------------------------------------------------ Sat, 16 Jul 2005 07:58:56 +0000 : chx Steven. Dries did not like that version hence the additional parameter. Dries, now that even Steven is on my side, would you please reconsider :) ? ------------------------------------------------------------------------ Sat, 16 Jul 2005 09:01:00 +0000 : adrian I concurr about the mixed parameter. ------------------------------------------------------------------------ Sat, 16 Jul 2005 12:55:57 +0000 : walkah let me weigh in +1 on the mixed parameter side ... let's get away from blowing up backwards compatibility unless it's justified and/or unavoidable for the sake of progress. please :) ------------------------------------------------------------------------ Sun, 17 Jul 2005 18:07:25 +0000 : chx Attachment: http://drupal.org/files/issues/nodeload.patch (15.46 KB) ------------------------------------------------------------------------ Sun, 17 Jul 2005 18:17:34 +0000 : chx Attachment: http://drupal.org/files/issues/nodeload_0.patch (18.98 KB) poor book module remained unpatched. ------------------------------------------------------------------------ Sun, 17 Jul 2005 18:20:48 +0000 : chx Attachment: http://drupal.org/files/issues/nodeload_1.patch (18.15 KB) wrong version.
participants (9)
-
adrian -
chx -
clydefrog -
Earl Dunovant -
Jose A Reyero -
Robert Douglass -
stefan nagtegaal -
Steven -
walkah