function location_update_5306 in Location 5.3
File
- ./
location.install, line 729 - Installation / uninstallation routines.
Code
function location_update_5306() {
$ret = array();
// Set this again because it wasn't put in in the first revision of 5305.
variable_set('location_5305_done', TRUE);
variable_set('location_5306_done', TRUE);
$result = db_query("SELECT name FROM {variable} WHERE name LIKE 'location_settings_%'");
while ($row = db_fetch_object($result)) {
$var = variable_get($row->name, array());
$collect = $var['form']['fields'];
$var['form']['fields'] = array();
foreach ($collect as $k => $v) {
$var['form']['fields'][$k]['collect'] = $v;
}
// Country 3 has changed to 4 to make requirements code easier.
if (isset($var['form']['fields']['country']['collect']) && $var['form']['fields']['country']['collect'] == 3) {
$var['form']['fields']['country']['collect'] = 4;
}
// Weight and default values don't need to get set for now.
variable_set($row->name, $var);
}
return $ret;
}