security update core+modules
This commit is contained in:
@@ -19,64 +19,9 @@ function custom_search_install() {
|
||||
* Implements hook_uninstall().
|
||||
*/
|
||||
function custom_search_uninstall() {
|
||||
variable_del('custom_search_label_visibility');
|
||||
variable_del('custom_search_label');
|
||||
variable_del('custom_search_text');
|
||||
variable_del('custom_search_size');
|
||||
variable_del('custom_search_max_length');
|
||||
variable_del('custom_search_submit_text');
|
||||
variable_del('custom_search_image_path');
|
||||
variable_del('custom_search_criteria_or_display');
|
||||
variable_del('custom_search_criteria_or_label');
|
||||
variable_del('custom_search_criteria_phrase_display');
|
||||
variable_del('custom_search_criteria_phrase_label');
|
||||
variable_del('custom_search_criteria_negative_display');
|
||||
variable_del('custom_search_criteria_negative_label');
|
||||
variable_del('custom_search_paths');
|
||||
variable_del('custom_search_paths_selector');
|
||||
variable_del('custom_search_paths_selector_label');
|
||||
variable_del('custom_search_paths_selector_label_visibility');
|
||||
variable_del('custom_search_search_box_weight');
|
||||
variable_del('custom_search_content_types_weight');
|
||||
variable_del('custom_search_criteria_or_weight');
|
||||
variable_del('custom_search_criteria_phrase_weight');
|
||||
variable_del('custom_search_criteria_negative_weight');
|
||||
variable_del('custom_search_custom_paths_weight');
|
||||
variable_del('custom_search_submit_button_weight');
|
||||
variable_del('custom_search_search_box_region');
|
||||
variable_del('custom_search_content_types_region');
|
||||
variable_del('custom_search_criteria_or_region');
|
||||
variable_del('custom_search_criteria_phrase_region');
|
||||
variable_del('custom_search_criteria_negative_region');
|
||||
variable_del('custom_search_custom_paths_region');
|
||||
variable_del('custom_search_submit_button_region');
|
||||
variable_del('custom_search_target');
|
||||
variable_del('custom_search_node_types');
|
||||
variable_del('custom_search_node_types_excluded');
|
||||
variable_del('custom_search_other');
|
||||
variable_del('custom_search_type_selector');
|
||||
variable_del('custom_search_type_selector_label');
|
||||
variable_del('custom_search_type_selector_label_visibility');
|
||||
variable_del('custom_search_type_selector_all');
|
||||
variable_del('custom_search_any_restricts');
|
||||
variable_del('custom_search_any_force');
|
||||
variable_del('custom_search_results_search');
|
||||
variable_del('custom_search_results_advanced_search');
|
||||
variable_del('custom_search_results_advanced_search_collapsible');
|
||||
variable_del('custom_search_results_advanced_search_collapsed');
|
||||
variable_del('custom_search_advanced_or_display');
|
||||
variable_del('custom_search_advanced_phrase_display');
|
||||
variable_del('custom_search_advanced_negative_display');
|
||||
$options = node_type_get_names();
|
||||
foreach ($options as $type => $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');
|
||||
variable_del('custom_search_search_api_page');
|
||||
db_delete('variable')
|
||||
->condition('name', 'custom_search_%', 'LIKE')
|
||||
->execute();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -94,7 +39,7 @@ function custom_search_update_7100() {
|
||||
->fields(array('weight' => 100))
|
||||
->condition('name', 'custom_search')
|
||||
->execute();
|
||||
return t('Module\'s weight increased.');
|
||||
return t("Module's weight increased.");
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -127,14 +72,35 @@ function custom_search_update_7103() {
|
||||
if (count($types)) {
|
||||
$names = array_keys(node_type_get_names());
|
||||
foreach ($names as $name) {
|
||||
if (!in_array($name, $types)) variable_set('custom_search_advanced_type_' . $name . '_display', FALSE);
|
||||
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);
|
||||
if (module_exists('taxonomy')) {
|
||||
$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 t('Advanced search form settings changed.');
|
||||
}
|
||||
|
||||
/**
|
||||
* Store vids - machine names association.
|
||||
*/
|
||||
function custom_search_update_7104() {
|
||||
if (module_exists('taxonomy')) {
|
||||
$vocabularies = taxonomy_get_vocabularies();
|
||||
$machine_names = array();
|
||||
foreach ($vocabularies as $voc) {
|
||||
$machine_names[$voc->machine_name] = $voc->vid;
|
||||
}
|
||||
// This will be needed for those upgrading to Drupal 8 or Backdrop.
|
||||
variable_set('custom_search_taxonomy_machine_names', $machine_names);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user