You are here

clients_drupal.install in Web Service Clients 7

Same filename and directory in other branches
  1. 6 backends/clients_drupal/clients_drupal.install

Sets system variables and deletes connections on uninstall @todo Delete resources on uninstall

File

backends/clients_drupal/clients_drupal.install
View source
<?php

/**
 * @file
 * Sets system variables and deletes connections on uninstall
 * @todo Delete resources on uninstall
 *
 */

/**
 * Implementation of hook_install().
 */
function clients_drupal_install() {
  $weight = (int) db_result(db_query("SELECT weight FROM {system} WHERE name = 'clients'"));
  db_query("UPDATE {system} SET weight = %d WHERE name = 'clients_drupal'", $weight + 1);
}

/**
 * Implementation of hook_uninstall().
 */
function clients_drupal_uninstall() {

  // remove any drupal services from connections table
  db_query("DELETE {clients_connections} FROM {clients_connections} \n      WHERE {clients_connections}.type = 'drupal_services'");

  // clean up any variables created by module
  $module_variables = array();
  foreach ($module_variables as $module_variable) {
    variable_del($module_variable);
  }
}

Functions

Namesort descending Description
clients_drupal_install Implementation of hook_install().
clients_drupal_uninstall Implementation of hook_uninstall().