function forum_access_node_update in Forum Access 7
Same name and namespace in other branches
- 8 forum_access.module \forum_access_node_update()
Implements hook_node_update().
File
- ./
forum_access.module, line 418 - forum_access.module
Code
function forum_access_node_update($node) {
$old_tid =& drupal_static('forum_access_node_presave');
if (_forum_node_check_node_type($node)) {
$tid = _forum_access_get_tid($node);
if (isset($old_tid)) {
if ($tid == $old_tid) {
return;
}
acl_node_clear_acls($node->nid, 'forum_access');
/*
if (module_exists('nodecomment')) {
_forum_access_changed_tid($tid);
$result = db_query('SELECT cid FROM {node_comments} WHERE nid = :nid', array(
':nid' => $node->nid,
));
foreach ($result as $row) {
acl_node_clear_acls($row->cid, 'forum_access');
}
}
*/
}
// For changed and for previously unassigned terms we need to fake an insert.
forum_access_node_insert($node);
}
}