Closed (fixed)
Project:
Google News sitemap
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
9 Jun 2009 at 18:49 UTC
Updated:
7 Aug 2009 at 20:00 UTC
This:
$sql = "select name, type from {node_type} order by name";
$result = db_query($sql);
while ($data = db_fetch_object($result)) {
$node = node_load($data->nid);
$cats[$data->type] = $data->name;
}
Seems like it could just as easily be a call to http://api.drupal.org/api/function/node_get_types/6 and you could avoid an extra database hit.
Comments
Comment #1
dave reidFixed in http://drupal.org/cvs?commit=242490. Thanks!