function pagestyle_update_5170 in Page Style 5
Update 5170 for 5.x-1.7: Change the cookie domain.
File
- ./
pagestyle.install, line 135 - This file update or uninstall the Page Style module.
Code
function pagestyle_update_5170() {
$ret = array();
// 1 Compatible to old cookies.
$link_ps_cookie_domain = '<a title="' . t('Page Style configuration') . ': ' . t('Cookie Domain') . '" href="' . url('admin/settings/pagestyle', $query = NULL, $fragment = 'edit-pagestyle-cookie-domain-wrapper') . '">' . t('Page Style configuration') . ': ' . t('Cookie Domain') . '</a>';
variable_set('pagestyle_cookie_domain', '/');
drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5170: ' . t('Variable updated:') . ' "<em>pagestyle_cookie_domain: /</em>".', 'status');
drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5170: ' . t('Now editable') . ': "' . t('Cookie Domain') . '" ' . t('on') . ' ' . $link_ps_cookie_domain . '. ' . t('For a compatibility to old cookies, use:') . ' "/"', 'ok');
// 2 Compatible to old designs.
$link_ps_fontweight = '<a title="' . t('Page Style configuration') . ': ' . t('Font weight') . '" href="' . url('admin/settings/pagestyle', $query = NULL, $fragment = 'pagestyle-fontweight') . '">' . t('Page Style configuration') . ': ' . t('Font weight') . '</a>';
variable_get('pagestyle_fontweight_white_black', 'normal');
drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5170: ' . t('Variable updated:') . ' "<em>pagestyle_fontweight_white_black: normal</em>".', 'status');
variable_get('pagestyle_fontweight_yellow_blue', 'normal');
drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5170: ' . t('Variable updated:') . ' "<em>pagestyle_fontweight_yellow_blue: normal</em>".', 'status');
drupal_set_message(t('Page Style') . ' ' . t('module') . '. ' . t('Update') . ' #5170: ' . t('Now editable') . ': "' . t('Font weight') . '" ' . t('on') . ' ' . $link_ps_fontweight . '. ' . t('For a compatibility to old designs, use:') . ' "Normal"', 'ok');
return $ret;
}