You are here

function filedepot_node_delete in filedepot 7

File

./filedepot.module, line 1706
filedepot.module Filedepot: File Management Module developed by Nextide www.nextide.ca Full featured document managment module with a desktop application feel. Integrated Organic Group, Role and User permissions to secure folders, automated…

Code

function filedepot_node_delete($node) {
  if ($node->type == 'filedepot_folder') {
    $cid = db_query("SELECT cid FROM {filedepot_categories} WHERE nid=:nid", array(
      'nid' => $node->nid,
    ))
      ->fetchField();
    if ($cid) {
      $filedepot = filedepot_filedepot();
      $filedepot
        ->deleteFolder($cid);
    }
  }
}