function gravatar_update_6000 in Gravatar integration 6
Same name and namespace in other branches
- 7 gravatar.install \gravatar_update_6000()
Variable and menu cleanup.
File
- ./
gravatar.install, line 107 - Install and uninstall schema and functions for the gravatar module.
Code
function gravatar_update_6000() {
// Integrate gravatar_defaulttype variable into the gravatar_imagedefault variable.
if (variable_get('gravatar_imagedefault', 2) == 2) {
$value = (int) variable_get('gravatar_default_type', 4);
variable_set('gravatar_imagedefault', $value + 2);
variable_del('gravatar_default_type');
}
// Rename gravatar_imagerating variable to gravatar_rating.
if ($value = variable_get('gravatar_imagerating', FALSE)) {
variable_set('gravatar_rating', $value);
variable_del('gravatar_imagerating');
}
// Rename gravatar_imagedefault to gravatar_default.
if ($value = variable_get('gravatar_imagedefault', FALSE)) {
variable_set('gravatar_default', $value);
variable_del('gravatar_imagedefault');
}
// Rename gravatar_displaysize to gravatar_size.
if ($value = variable_get('gravatar_displaysize', FALSE)) {
variable_set('gravatar_size', $value);
variable_del('gravatar_displaysize');
}
// Install cache table.
drupal_install_schema('gravatar');
return array();
}