You are here

function pagestyle_update_5140 in Page Style 5

Update 5140 for 5.x-1.4: Update variables.

File

./pagestyle.install, line 47
This file update or uninstall the Page Style module.

Code

function pagestyle_update_5140() {
  $ret = array();

  // 1 Update variable "pagestyle_link_type".
  if (variable_get('pagestyle_link_type', '') == "") {
    variable_set('pagestyle_link_type', 'variable');
    drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5140: ' . t('Variable updated:') . ' "<em>pagestyle_link_type: variable</em>".', 'status');
  }
  if (variable_get('pagestyle_link_type', '') == "_fix") {
    variable_set('pagestyle_link_type', 'fix');
    drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5140: ' . t('Variable updated:') . ' "<em>pagestyle_link_type: fix</em>".', 'status');
  }

  // 2 Update variable "pagestyle_list_inline".
  if (variable_get('pagestyle_list_inline', '') == "") {
    variable_set('pagestyle_list_inline', 'list');
    drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5140: ' . t('Variable updated:') . ' "<em>pagestyle_list_inline: list</em>".', 'status');
  }
  if (variable_get('pagestyle_list_inline', '') == "_inline") {
    variable_set('pagestyle_list_inline', 'inline');
    drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5140: ' . t('Variable updated:') . ' "<em>pagestyle_list_inline: inline</em>".', 'status');
  }

  // 3 Update variable "pagestyle_display_links".
  if (variable_get('pagestyle_display_links', '') == "") {
    variable_set('pagestyle_display_links', 'display');
    drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5140: ' . t('Variable updated:') . ' "<em>pagestyle_display_links: display</em>".', 'status');
  }

  // 4 Update variable "pagestyle_display_current_pagestyle".
  if (variable_get('pagestyle_display_current_pagestyle', '') == "") {
    variable_set('pagestyle_display_current_pagestyle', 'display');
    drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5140: ' . t('Variable updated:') . ' "<em>pagestyle_display_current_pagestyle: display</em>".', 'status');
  }
  return $ret;
}