Re: [development] node_get_types() D5 and php5
"The node_get_names() function no longer exists. Please use node_get_types('name', $node) instead. Similarly, the node_get_base() function no longer exists. Please use node_get_types('module', $node) instead." Which did not apply to my situation since it was already there in the code. In the api there is no mention of a change in the functions behavior either. Previously I was getting the right behaviour by just calling the function without the parameters. I was confused by the explicit call to 'names' or 'types' when I need both in the same call. I was used to node_get_types() in 4.7 then the behaviour that has changed with no mention of how to accomplish the same. I know someone else will want to do this and may be confused as I was, hence my post. Carl Mc Dade ____________________________ Web Developer ----- Original Message ---- From: Robert Douglass <rob@robshouse.net> To: development@drupal.org Sent: Wednesday, February 14, 2007 1:32:12 PM Subject: Re: [development] node_get_types() D5 and php5 The process of updating your modules will be easier with this reference: http://drupal.org/node/64279 node_get_types changes are covered there as well. -RD -- * * * * * Lullabot's First Ever Advanced Workshops Are Here! Drupal API & Module Building - Advanced Drupal Themeing April 9th-13th - Providence, RI Early Bird Discounts Available Now http://www.lullabot.com/training * * * * * ____________________________________________________________________________________ Need a quick answer? Get one in minutes from people who know. Ask your question on www.Answers.yahoo.com
Carl Mc Dade wrote:
"The |node_get_names()| function no longer exists. Please use |node_get_types('name', $node)| instead. Similarly, the |node_get_base()| function no longer exists. Please use |node_get_types('module', $node)| instead."
Which did not apply to my situation since it was already there in the code. In the api there is no mention of a change in the functions behavior either. Previously I was getting the right behaviour by just
Really? Compare: http://api.drupal.org/api/4.7/function/node_get_types to http://api.drupal.org/api/head/function/node_get_types The return value is notably different. I realize not every single detail is covered in the updating modules page, but the change IS documented in the api.
On 14 Feb 2007, at 14:41, Carl Mc Dade wrote:
Which did not apply to my situation since it was already there in the code. In the api there is no mention of a change in the functions behavior either. Previously I was getting the right behaviour by just calling the function without the parameters. I was confused by the explicit call to 'names' or 'types' when I need both in the same call. I was used to node_get_types() in 4.7 then the behaviour that has changed with no mention of how to accomplish the same. I know someone else will want to do this and may be confused as I was, hence my post.
Just as an aside -- this mailing list is not the place to document API changes. It's perfectly OK to ask for clarification about an API change, but once we figured out the answer/resolution/wording, it should be documented in the handbook and/or in the PHPdoc. That's were all information is centralized, and where we'll be able to reach most people. :) This might all be obvious but I figured to point it out for those who're not familiar with the process (yet). -- Dries Buytaert :: http://www.buytaert.net/
participants (3)
-
Carl Mc Dade -
Dries Buytaert -
Earl Miles