| 1 |
<?php
|
| 2 |
// $Id: sitedoc.install,v 1.7 2007/07/13 22:31:01 nancyw Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* Implementation of hook_install()
|
| 6 |
*
|
| 7 |
* Called when the module is enabled.
|
| 8 |
* This code only logs a message because we don't need to create any tables.
|
| 9 |
*/
|
| 10 |
function sitedoc_install() {
|
| 11 |
global $user;
|
| 12 |
drupal_set_message(t('The Site Documentation module was installed. You may want to go to the <a href="!settings">settings page now</a>.', array('!settings' => url('admin/settings/sitedoc'))));
|
| 13 |
}
|
| 14 |
|
| 15 |
/**
|
| 16 |
* Implementation of hook_uninstall()
|
| 17 |
*
|
| 18 |
* Called when the uninstall tab is used.
|
| 19 |
* This code will delete the settings variable, clear the menu cache, and log a message.
|
| 20 |
*/
|
| 21 |
function sitedoc_uninstall() {
|
| 22 |
global $user;
|
| 23 |
|
| 24 |
// Delete system variables
|
| 25 |
variable_del('sitedoc_settings');
|
| 26 |
|
| 27 |
cache_clear_all('*', 'cache_menu', TRUE);
|
| 28 |
|
| 29 |
drupal_set_message('Site Documentation module removed.');
|
| 30 |
}
|