Closed (works as designed)
Project:
Domain
Version:
7.x-2.16
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
16 Nov 2011 at 21:09 UTC
Updated:
21 Oct 2017 at 16:39 UTC
Jump to comment: Most recent
Comments
Comment #1
agentrickardThe -1 is because you can't use 0 with checkboxes. This piece of hilarity was removed from 7.x.3, so there you do this:
See
domain_node_access_records()for the save logic.Comment #2
rangi500 commented@agentrickard Thanks for your comment, it helped me figure this out. Here's how I'm saving my nodes. The comments explain which parts of the node edit form each of the node properties relate to.
// Set domain access:
$node->domain_site = FALSE; // Sets "Send to all affiliates" off
$node->domain_source = $domain_id; // Sets the "Source domain"
$node->domains = array($domain_id => $domain_id); // Sets the domains node is published to.
// Save node:
node_save($node);
Comment #3
agentrickard