If ya strongarm privacy fields, they're not in the database, so direct query of the variables table returns nada.

Likely better to content_fields() foreach checking like cck_private_fields_get_content_private_fields (well, mostly like, it's doing a direct query on the database instead of $info =content_types($type); $fields = $info['fields'];.)

What would likely be nice is to use hook_fields_settings_alter (or whatever that hook is called) and store settings with the field*, which would then be exported with the field, so get both features and strongarm happy!, but upgrade path would be :(.

*or widget settings, so reused fields can be individually set, which personally would find quite useful, as right now using a combination of nodeapi/form_alter to do that.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hefox’s picture

Status: Active » Needs review
FileSize
1.95 KB

Patch attach that uses content_fields for cck_private_fields_get_private_fields (which had the conflict) and content_types for cck_private_fields_get_content_private_fields (cause I felt like it, bad me).

The reset param on cck_private_fields_get_private_fields was useless as it remade each time, hehe!

hefox’s picture

Function bugged to begin with? suppose to return all private fields (as according to comment) but instead returning all fields with the variable set, even if set to disabled.

hefox’s picture

NVM, misunderstood how it worked