Closed (fixed)
Project:
CCK Field Privacy
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
26 Mar 2008 at 16:35 UTC
Updated:
12 Sep 2008 at 01:41 UTC
Hi,
I had created a content type in my Drupal install named 'company_profile'. I changed the CCK field privacy settings to allow privacy options for this content type.
However, the padlocks never showed up.
Digging into the code, i found that the content type name is retrieved by the following code:
$node_name_array = explode('_', $form_id);
This broke the functionality for my content type. However, a few lines above the content type name is retrieved in another way:
$form['#node']->type
The attached patch changes the code so it uses the 2nd method to retrieve the name of the content type of the currently watched form, fixing the bug i encountered.
Please review the patch, and commit if it doesn't break anything. I know for me it didn't.
| Comment | File | Size | Author |
|---|---|---|---|
| cck_field_privacy_contenttype.patch | 1.63 KB | sdecabooter |
Comments
Comment #1
obsidiandesign commentedPatch works as explained - thanks for bringing this inconsistency to my attention. I'll commit to CVS & look at re-rolling a version when I clear #242912: cck field privacy not working.
Comment #2
obsidiandesign commentedCommitted to 5.x.-1.2.
Comment #3
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #4
bduell commentedThe code on the following page does the same thing (but with a single line addition):
http://drupal.org/node/298954