function photos_access_node_delete in Album Photos 7.3
Same name and namespace in other branches
- 8.5 photos_access/photos_access.module \photos_access_node_delete()
- 8.4 photos_access/photos_access.module \photos_access_node_delete()
- 6.0.x photos_access/photos_access.module \photos_access_node_delete()
Implements hook_node_delete().
File
- photos_access/
photos_access.module, line 361
Code
function photos_access_node_delete($node) {
db_query('DELETE FROM {photos_access_album} WHERE nid = :nid', array(
':nid' => $node->nid,
));
if (isset($node->privacy['vid'])) {
db_query('DELETE FROM {photos_access_user} WHERE id = :id', array(
':id' => $node->privacy['vid'],
));
}
if (isset($node->privacy['eid'])) {
db_query('DELETE FROM {photos_access_user} WHERE id = :id', array(
':id' => $node->privacy['eid'],
));
}
}