Postponed (maintainer needs more info)
Project:
CCK Private Fields
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2010 at 13:25 UTC
Updated:
17 Sep 2010 at 19:02 UTC
Hi
I discovered that cck_private_fields_get_node_privacy_status returns an array of private cck fields where theirs private-status is 0, regardless of the actual settings of the field. I looked into the code and found out, that casting "cck_private_fields_(0|1|2)" to int always results in 0.
Reading the doc at http://php.net/manual/en/language.types.string.php#language.types.string... it seems, that this is a bug. I'll try to deliver a patch the next days.
Comments
Comment #1
markus_petrux commentedI'm not really sure what you mean. This is the code of the function
cck_private_fields_get_node_privacy_status():It reads the privacy status from the database, where the SQL statement returns a string, it cast that to an integer, but that does not seem incorrect, I think.
Could you please clarify?
Comment #2
stmh commentedHi,
i digged a bit deeper into this issue, and the root cause was that the default-values for the various privacy options were saved as "cck_private_fields_0", "cck_private_fields_1" or "cck_private_fields_2" into the database and not as their integer-values 0,1 or 2 when a node was saved with new privacy-settings.
Instead of digging deeper into the code I installed the dev-version of the module, and now it seems to work correctly.
Sorry for the noise!
cheers,
Stephan