function mobile_tools_update_7200 in Mobile Tools 7.3
Same name and namespace in other branches
- 7.2 mobile_tools.install \mobile_tools_update_7200()
Implements hook_update_N().
Rename variable names with a dash to comply with Drupal coding standards.
File
- ./
mobile_tools.install, line 130 - Instalation of the mobile_tools module
Code
function mobile_tools_update_7200() {
// Load the t function in case it isn't loaded yet
$t = get_t();
$mt_device_detection = variable_get('mobile-tools-device-detection', 'mobile_tools');
$mt_device_capabilities = variable_get('mobile-tools-device-capabilities', 'wurfl');
$mt_device_capability = variable_get('mobile-tools-device-capability', 'wurfl');
$mt_theme_switch = variable_get('mobile-tools-theme-switch', 'mobile-tools-no-switch');
$mt_site_type_detection = variable_get('mobile-tools-site-type-detection', 'mobile_tools');
variable_set('mobile_tools_device_detection', $mt_device_detection);
variable_set('mobile_tools_device_capabilities', $mt_device_capabilities);
variable_set('mobile_tools_device_capability', $mt_device_capability);
variable_set('mobile_tools_theme_switch', $mt_theme_switch);
variable_set('mobile_tools_site_type_detection', $mt_site_type_detection);
variable_del('mobile-tools-device-detection');
variable_del('mobile-tools-device-capabilities');
variable_del('mobile-tools-device-capability');
variable_del('mobile-tools-theme-switch');
variable_del('mobile-tools-site-type-detection');
return $t('Renamed incorrect variable names.');
}