You are here

function _backwards_compatibility in Glossify 6.3

Same name and namespace in other branches
  1. 6 glossify.module \_backwards_compatibility()

Helper function that cleans up old variables and inserts old cck values into the keyword table.

1 call to _backwards_compatibility()
glossify_enable in ./glossify.install
Implementation of hook_enable().

File

./glossify.module, line 1006

Code

function _backwards_compatibility() {
  $keyword_field = variable_get('glossify_use_this_cck_field_for_keyword_synonyms', FALSE);
  $override_field = variable_get('glossify_use_this_cck_field_for_target_url_override', '');
  if ($keyword_field) {
    $content_types = variable_get('glossify_glossary_content_type', array());
    if (count($content_types > 0)) {
      $methods = array(
        'title',
        'cck' => array(
          'keyword_field' => $keyword_field,
          'override_field' => $override_field,
        ),
      );
      _update_keywords_for_methods($content_types, $methods);
    }
  }
  variable_del('glossify_glossary_content_type');
  variable_del('glossify_content_types_to_search');
  variable_del('glossify_link_first_only');
  variable_del('glossify_do_we_need_unicode_compatibility');
  variable_del('glossify_teaser');
  variable_del('glossify_style');
  variable_del('glossify_dont_break_words');
  variable_del('glossify_display_parsing_time_for_performance_debugging');
  variable_del('glossify_use_this_cck_field_for_keyword_synonyms');
  variable_del('glossify_use_this_cck_field_for_target_url_override');
}