You are here

function clients_connection_uninstall_connection_delete in Web Service Clients 6.2

Same name and namespace in other branches
  1. 7.3 clients.install \clients_connection_uninstall_connection_delete()
  2. 7.2 clients.install \clients_connection_uninstall_connection_delete()

Helper function for connection type modules to delete all their connections.

For example usage, see clients_drupal_uninstall().

Parameters

$module: The name of the module whose connections should be deleted.

1 call to clients_connection_uninstall_connection_delete()
clients_drupal_uninstall in connections/clients_drupal/clients_drupal.install
Implementation of hook_uninstall().

File

./clients.install, line 103
Install, update and uninstall functions for the Clients module.

Code

function clients_connection_uninstall_connection_delete($module) {

  // Invoke hook_clients_connection_type_info().
  // This works even when the module is about to be uninstalled.
  $connection_types = module_invoke($module, 'clients_connection_type_info');
  foreach ($connection_types as $type => $info) {
    db_query("DELETE FROM {clients_connections} WHERE type = '%s'", $type);
  }
}