notifications_ui.install in Notifications 6.2
File
notifications_ui/notifications_ui.install
View source
<?php
function notifications_ui_install() {
variable_set('notifications_ui_user', array(
'page' => 'page',
'create' => 'create',
));
variable_set('notifications_ui_node', array(
'links' => 'links',
'teaserlinks' => 'teaserlinks',
'block' => 'block',
));
variable_set('notifications_ui_account_options', array(
'links' => 'links',
'block' => 'block',
));
variable_set('notifications_ui_types', array(
'thread' => 'thread',
'nodetype' => 'nodetype',
'author' => 'author',
));
}
function notifications_ui_uninstall() {
variable_del('notifications_ui_per_type');
variable_del('notifications_ui_user');
variable_del('notifications_ui_node');
variable_del('notifications_ui_account_options');
variable_del('notifications_ui_types');
foreach (array_keys(node_get_types()) as $type) {
variable_del('notifications_node_ui_' . $type);
}
}
function notifications_ui_update_6000() {
variable_del('notifications_link_teaser');
drupal_set_message(t('Please, check all your Notifications UI settings and note the new options.'));
return array();
}
function notifications_ui_update_6001() {
$ret = array();
$ret[] = update_sql("UPDATE {blocks} SET cache = " . BLOCK_NO_CACHE . " WHERE module = 'notifications_ui'");
$ret[] = update_sql("DELETE FROM {cache_block} WHERE cid LIKE 'notifications_ui:%'");
return $ret;
}