$name) variable_del('custom_search_advanced_type_' . $type . '_display'); variable_del('custom_search_results_info_type'); variable_del('custom_search_results_info_user'); variable_del('custom_search_results_info_date'); if (module_exists('comment')) variable_del('custom_search_results_info_comment'); if (module_exists('upload')) variable_del('custom_search_results_info_upload'); variable_del('custom_search_filter'); variable_del('custom_search_filter_label'); } /** * Implementation of hook_enable(). */ function custom_search_enable() { drupal_set_message(t('Custom Search enabled. Don\'t forget to set permissions.', array('@link' => url('admin/user/permissions', array('fragment' => 'module-custom_search'))))); } /** * Increase the module weight. */ function custom_search_update_6100() { $ret = array(); $ret[] = update_sql("UPDATE {system} SET weight = 100 WHERE name = 'custom_search'"); return $ret; } function custom_search_update_6101() { $ret = array(); drupal_set_message(t('Custom Search has been divided in multiple modules. Please re-enable the sub-modules you need.')); return $ret; } function custom_search_update_6102() { $ret = array(); if (variable_get('custom_search_path', '') != '') { variable_set('custom_search_paths', variable_get('custom_search_path', '') . '|Custom path'); } variable_del('custom_search_path'); return $ret; } function custom_search_update_6103() { $ret = array(); if (variable_get('custom_search_results_advanced_override', FALSE)) { variable_set('custom_search_advanced_or_display', variable_get('custom_search_criteria_or_display', FALSE)); variable_set('custom_search_advanced_phrase_display', variable_get('custom_search_criteria_phrase_display', FALSE)); variable_set('custom_search_advanced_negative_display', variable_get('custom_search_criteria_negative_display', FALSE)); $types = array_keys(array_filter(variable_get('custom_search_node_types', array()))); if (count($types)) { $names = array_keys(node_get_types('names')); foreach ($names as $name) { if (!in_array($name, $types)) variable_set('custom_search_advanced_type_' . $name . '_display', FALSE); } } $vocabularies = taxonomy_get_vocabularies(); foreach ($vocabularies as $voc) { if (variable_get('custom_search_voc' . $voc->vid . '_selector', 'disabled') == 'disabled') variable_set('custom_search_advanced_voc' . $voc->vid . '_display', FALSE); } } variable_del('custom_search_results_advanced_override'); return $ret; }