content_fields(NULL, $node['type']);

Will return all fields, not fields for that content type
http://drupalcontrib.org/api/drupal/contributions--cck--content.module/f...

$type_info = content_types($node['type']);
$fields = $type_info['fields'];

is the way to get info about all fields for a specific content type (I believe; off top of head).

Comments

hefox’s picture

Version: 6.x-3.1 » 6.x-3.x-dev
hefox’s picture

BTW, why isn't that area using the content_access function?

kylebrowning’s picture

can you provide a patch?

Im not sure why its not, but I never thought it needed to be.

I have nit been focusing on the 6.x version of things

kylebrowning’s picture

Assigned: Unassigned » cotto
Category: bug » task

Cotto can you double check this is needed/better and if so just go ahead and commit it.

hefox’s picture

Here's a /quickie/ patch against whatever version I'm running that combines the content type + content_access change. It's of course, not tested at all.

hefox’s picture

StatusFileSize
new1.61 KB

Right... the patch...

hefox’s picture

StatusFileSize
new1.62 KB

Course the patch has a typo

kylebrowning’s picture

Status: Active » Needs review
kylebrowning’s picture

Status: Needs review » Closed (fixed)

Thanks!