You are here

function filebrowser_uninstall in Filebrowser 7.2

Same name and namespace in other branches
  1. 8.2 filebrowser.install \filebrowser_uninstall()
  2. 8 filebrowser.install \filebrowser_uninstall()
  3. 6.2 filebrowser.install \filebrowser_uninstall()
  4. 6 filebrowser.install \filebrowser_uninstall()
  5. 7.4 filebrowser.install \filebrowser_uninstall()
  6. 7.3 filebrowser.install \filebrowser_uninstall()
  7. 3.x filebrowser.install \filebrowser_uninstall()

File

./filebrowser.install, line 98
filbrowser installation file.

Code

function filebrowser_uninstall() {
  $sql = 'SELECT nid FROM {node} n WHERE n.type = :type';
  $result = db_query($sql, array(
    ':type' => 'dir_listing',
  ));
  $nids = array();
  foreach ($result as $row) {
    $nids[] = $row->nid;
  }

  // http://api.drupal.org/api/function/node_delete_multiple/7
  node_delete_multiple($nids);

  // http://api.drupal.org/api/function/node_type_delete/7
  node_type_delete('dir_listing');
}