You are here

function uc_catalog_uninstall in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 uc_catalog/uc_catalog.install \uc_catalog_uninstall()
  2. 5 uc_catalog/uc_catalog.install \uc_catalog_uninstall()
  3. 6.2 uc_catalog/uc_catalog.install \uc_catalog_uninstall()

Implements hook_uninstall().

File

uc_catalog/uc_catalog.install, line 21
Install, update and uninstall functions for the uc_catalog module.

Code

function uc_catalog_uninstall() {
  if ($vid = variable_get('uc_catalog_vid', 0)) {
    $vocab = taxonomy_vocabulary_load($vid);
    drupal_set_message(t('The Ubercart Catalog vocabulary has not been deleted. If you need to delete it, <a href="@url">please do so manually</a>.', array(
      '@url' => url('admin/structure/taxonomy/' . $vocab->machine_name . '/edit'),
    )), 'warning');
  }
  db_delete('variable')
    ->condition('name', 'uc_catalog_%', 'LIKE')
    ->execute();
}