talk.install in Talk 6
Same filename and directory in other branches
Install/uninstall code for talk module.
File
talk.installView source
<?php
/**
* @file
* Install/uninstall code for talk module.
*/
/**
* Implementation of hook_uninstall().
*/
function talk_uninstall() {
variable_del('talk_title');
$result = db_query("DELETE FROM {variable} WHERE name LIKE 'comment_talk_%%'");
cache_clear_all('variables', 'cache');
}
/**
* Provide 3 different settings instead of the one. Default to the one.
*/
function talk_update_1() {
$default = variable_get('talk_title', t('Talk'));
variable_set('talk_tab', $default);
variable_set('talk_page', $default);
variable_set('talk_link', $default);
variable_del('talk_title');
return array(
array(
'success' => TRUE,
'query' => 'Your Talk module settings have been updated automatically to support customizable strings. You may want to configure them further at Administer > Site configuration > Talk page.',
),
);
}
Functions
Name | Description |
---|---|
talk_uninstall | Implementation of hook_uninstall(). |
talk_update_1 | Provide 3 different settings instead of the one. Default to the one. |