function _nodehierarchy_save_node in Node Hierarchy 7.4
Same name and namespace in other branches
- 6.3 nodehierarchy.module \_nodehierarchy_save_node()
- 6.2 nodehierarchy.module \_nodehierarchy_save_node()
- 7.2 nodehierarchy.module \_nodehierarchy_save_node()
Do the actual insertion or update. No permissions checking is done here.
2 calls to _nodehierarchy_save_node()
- nodehierarchy_insert_node in ./
nodehierarchy.admin.inc - Insert a node. Create parents and menus etc.
- nodehierarchy_update_node in ./
nodehierarchy.admin.inc - Update a node's parent and create menus etc.
File
- ./
nodehierarchy.admin.inc, line 761 - Admin functions for Node Hierarchy
Code
function _nodehierarchy_save_node(&$node) {
if (!isset($node->nodehierarchy_parents)) {
return;
}
foreach ($node->nodehierarchy_parents as $i => $item) {
$node->nodehierarchy_parents[$i] = (object) $item;
$node->nodehierarchy_parents[$i]->cnid = $node->nid;
if (!empty($node->nodehierarchy_parents[$i]->remove)) {
$node->nodehierarchy_parents[$i]->pnid = NULL;
}
_nodehierarchy_record_save($node->nodehierarchy_parents[$i]);
}
}