function weather_update_6200 in Weather 6.5
Implementation of hook_update_N().
Adjust block deltas for multiple system-wide weather blocks.
File
- ./
weather.install, line 424 - Database installation of weather module.
Code
function weather_update_6200() {
$ret = array();
// Change default weather configuration from UID -2 to UID 0
$sql = "UPDATE {weather_config} SET uid = 0 WHERE uid = -2";
$ret[] = update_sql($sql);
// Temporarily adjust the block delta of system-wide block
$sql = "UPDATE {blocks} SET delta = '10' WHERE delta = '0' AND module = 'weather'";
$ret[] = update_sql($sql);
// Adjust the block delta of custom user block
$sql = "UPDATE {blocks} SET delta = '0' WHERE delta = '1' AND module = 'weather'";
$ret[] = update_sql($sql);
// Adjust the block delta of location block
$sql = "UPDATE {blocks} SET delta = '1' WHERE delta = '2' AND module = 'weather'";
$ret[] = update_sql($sql);
// Adjust the block delta of system-wide block
$sql = "UPDATE {blocks} SET delta = '2' WHERE delta = '10' AND module = 'weather'";
$ret[] = update_sql($sql);
return $ret;
}