Motivation:
Over at #1115824: Switch from Flag to Signup for personal session schedule, we're trying to programmatically disable signup on new nodes of the 'session' content type, but the site-wide defaults override any values set in the new node object.

This patch keeps the defaults in place but lets them be overridden if they are already set in the node.

I tested this with the following programmatic example:

$node->type = 'event';
$node->title = 'Test Overriding signup values';
$node->signup_enabled = TRUE;
$node->signup_confirmation_email = 'Overridden confirmation email.';
node_save($node);

CommentFileSizeAuthor
signup-override-values.patch1.73 KBezra-g

Comments

ezra-g’s picture

Status: Active » Needs review