You are here

function signature_forum_uninstall in Signatures for Forums 6

Same name and namespace in other branches
  1. 5.2 signature_forum.install \signature_forum_uninstall()
  2. 5 signature_forum.install \signature_forum_uninstall()
  3. 7 signature_forum.install \signature_forum_uninstall()

Implementation of hook_uninstall().

File

./signature_forum.install, line 93
Installs, updates and uninstalls signature_forum module.

Code

function signature_forum_uninstall() {

  // Copy the signatures back to Drupal core
  switch ($GLOBALS['db_type']) {
    case 'mysql':
    case 'mysqli':
      db_query("UPDATE {users}, {users_signature}\n        SET {users}.signature={users_signature}.signature\n        WHERE {users}.uid={users_signature}.uid");
      break;
    case 'pgsql':
      db_query("UPDATE {users} SET signature={users_signature}.signature FROM {users_signature}\n        WHERE {users}.uid={users_signature}.uid");
      break;
  }
  drupal_uninstall_schema('signature_forum');
  variable_del('signature_forum_settings');
}