function browscap_update_6001 in Browscap 6
Rename and remove old variables.
File
- ./
browscap.install, line 133 - Install, update and uninstall functions for the Browscap module.
Code
function browscap_update_6001() {
// Find the length of the update interval
$browscap_update_interval = variable_get('browscap_update_interval', 7);
// If the interval length was 0 then disable updates
if ($browscap_update_interval == 0) {
variable_set('browscap_enable_automatic_updates', FALSE);
}
// Delete the interval variable
variable_del('browscap_update_interval');
// Rename the user agent monitoring variable
$browscap_monitor = variable_get('browscap_monitor', FALSE);
variable_set('browscap_enable_user_agent_log', $browscap_monitor);
variable_del('browscap_monitor');
return array(
array(
'success' => TRUE,
'query' => 'Renamed and removed old variables.',
),
);
}