I noticed that all the nodes created, whether their "Only My Friends" option checked or not, makes the node private.
The hook_node_insert() implementation checks if the $node object has 'flag_friend_access' property.
The property exists whether the checkbox is checked or not, with a value of 1 or 0 respectively.
IMO, the check should be against the value.
Patch will follow.
p.s. This issue only occurs for new nodes. Editing nodes doesn't change the selected option for "Only My Friends" checkbox.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | flag_friend_hook_node_insert-implementation-makes-the-node-private-at-all-times-1936798-1.patch | 977 bytes | osman |
Comments
Comment #1
osmanComment #2
osmanComment #3
socketwench commentedLooks good to me. Tests clean and confirmed with manual testing.
Comment #4
socketwench commentedAnd committed to Dev.
http://drupalcode.org/project/flag_friend.git/commit/4897672