Download & Extend

Integration with Flag module: support for default values

Project:Node Reference Create
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs review

Issue Summary

I've just had the requirement that nodes created by noderefcreate should honor the default values of any flags defined for a particular node type. With the help of the Flag API that was quite easy.

The attached patch looks for all global flags created for a particular node type and ensures that the newly created node has the associated flags set to their default value or FALSE, if no default value was defined. I've not tested this with anything other than 'node' content types and global flags.

Apologies if the patch does not adhere to any guidelines. I'm wrapping this up quickly after midnight.

Comments

#1

Status:patch (to be ported)» needs review

#2

So, where's the patch?

#3

Sorry, here it is.

AttachmentSize
flag_support.patch.txt 885 bytes

#4

The patch looks good :-)

nobody click here