You are here

function weather_update_7 in Weather 6.5

Same name and namespace in other branches
  1. 5.6 weather.install \weather_update_7()

Implementation of hook_update_N().

Change UID of the system weather block from 0 to -1 and add Melbourne to ICAO codes

File

./weather.install, line 325
Database installation of weather module.

Code

function weather_update_7() {
  $ret = array();

  // Change UID of the system weather block from 0 to -1
  $sql = "UPDATE {weather_config} SET uid = -1 WHERE uid = 0";
  $ret[] = update_sql($sql);

  // Add Melbourne to ICAO codes
  require_once drupal_get_path('module', 'weather') . '/weather_data.inc';
  _weather_fill_icao_table();
  return $ret;
}