View source
<?php
function devel_enable() {
$t = get_t();
db_update('system')
->fields(array(
'weight' => 88,
))
->condition('type', 'module')
->condition('name', 'devel')
->execute();
if (module_exists('menu')) {
$menu = array(
'menu_name' => 'devel',
'title' => $t('Development'),
'description' => $t('Development link'),
);
menu_save($menu);
}
}
function devel_uninstall() {
variable_del('devel_execution');
variable_del('devel_timer');
variable_del('devel_query_display');
variable_del('devel_redirect_page');
variable_del('devel_api_url');
variable_del('devel_memory');
variable_del('devel_error_handlers');
variable_del('devel_raw_names');
variable_del('devel_switch_user_list_size');
variable_del('devel_switch_user_include_anon');
variable_del('devel_switch_user_show_form');
variable_del('devel_krumo_skin');
variable_del('devel_page_alter');
variable_del('devel_query_random_range');
variable_del('devel_query_sort');
variable_del('devel_rebuild_theme_registry');
variable_del('devel_use_uncompressed_jquery');
variable_del('devel_debug_mail_file_format');
variable_del('devel_debug_mail_directory');
if (module_exists('menu')) {
if ($devel_menu = menu_load('devel')) {
menu_delete($devel_menu);
}
}
}
function devel_update_7000() {
db_drop_table('devel_queries');
db_drop_table('devel_times');
}
function devel_update_7001() {
db_delete('menu_links')
->condition('module', 'devel')
->execute();
variable_set('menu_rebuild_needed', TRUE);
return t('Devel module menu links will be rebuilt.');
}
function devel_update_7002() {
variable_del('dev_query');
variable_del('devel_code_coverage');
}
function devel_update_7003() {
if (variable_get('devel_krumo_skin', 'white') == 'schablon.com') {
variable_set('devel_krumo_skin', 'white');
}
}
function devel_update_7004() {
define('DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE', 3);
$error_handler = variable_get('devel_error_handler', NULL);
if (isset($error_handler)) {
if ($error_handler == DEVEL_ERROR_HANDLER_BACKTRACE_AND_MESSAGE) {
$error_handlers = array(
DEVEL_ERROR_HANDLER_STANDARD,
DEVEL_ERROR_HANDLER_BACKTRACE_KRUMO,
);
}
else {
$error_handlers = array(
$error_handler,
);
}
variable_del('devel_error_handler');
variable_set('devel_error_handlers', drupal_map_assoc($error_handlers));
}
}
function devel_update_7005() {
variable_del('devel_form_weights');
}
function devel_update_7006() {
if (variable_get('dev_mem', NULL) !== NULL) {
variable_set('devel_memory', variable_get('dev_mem'));
}
variable_del('dev_mem');
}
function devel_update_7007() {
variable_del('devel_xhprof_directory');
variable_del('devel_xhprof_enabled');
variable_del('devel_xhprof_url');
}
function devel_update_7008() {
if (variable_get('dev_timer') !== NULL) {
variable_set('devel_timer', variable_get('dev_timer'));
}
variable_del('dev_timer');
}