clients_drupal.install in Web Service Clients 6
Same filename and directory in other branches
Sets system variables and deletes connections on uninstall @todo Delete resources on uninstall
@author Django Beatty - adub
File
backends/clients_drupal/clients_drupal.installView source
<?php
/**
* @file
* Sets system variables and deletes connections on uninstall
* @todo Delete resources on uninstall
*
* @author Django Beatty - adub
*/
/**
* 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);
variable_set('clients_drupal_type', 'Drupal Services');
drupal_set_message(t('Clients module - please visit the status report (admin/reports/status) for initial setup tasks to complete installation.'));
}
/**
* 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 = '%s'", variable_get('clients_drupal_type', 'Drupal Services'));
// clean up any variables created by module
$module_variables = array(
'clients_drupal_type',
);
foreach ($module_variables as $module_variable) {
variable_del($module_variable);
}
}
Functions
Name | Description |
---|---|
clients_drupal_install | Implementation of hook_install(). |
clients_drupal_uninstall | Implementation of hook_uninstall(). |