You are here

function flag_uninstall in Flag 7.2

Same name and namespace in other branches
  1. 5 flag.install \flag_uninstall()
  2. 6.2 flag.install \flag_uninstall()
  3. 6 flag.install \flag_uninstall()
  4. 7.3 flag.install \flag_uninstall()

Implements hook_uninstall().

File

./flag.install, line 17
Flag module install/schema/update hooks.

Code

function flag_uninstall() {
  $result = db_select('variable', 'v')
    ->fields('v', array(
    'name',
  ))
    ->condition('name', 'flag_%', 'LIKE')
    ->execute();
  foreach ($result as $row) {
    variable_del($row->name);
  }
  drupal_set_message(t('Flag has been uninstalled.'));
}