You are here

function taxonomy_defaults_update_6101 in Taxonomy Defaults 6.2

Same name and namespace in other branches
  1. 6 taxonomy_defaults.install \taxonomy_defaults_update_6101()
  2. 7 taxonomy_defaults.install \taxonomy_defaults_update_6101()

Update taxonomy defaults weighting. Previous versions of taxonomy defaults had to run BEFORE taxonomy, but now it must run AFTER taxonomy

File

./taxonomy_defaults.install, line 76
Install, update and uninstall functions for the taxonomy_defaults module.

Code

function taxonomy_defaults_update_6101() {
  $ret = array();
  $weight = 0;
  $query = "SELECT weight FROM {system} WHERE type = 'module' AND status = 1 and name = 'taxonomy'";
  $result = db_query($query);
  if ($row = db_fetch_object($result)) {
    $weight = $row->weight;
  }
  $weight = $weight + 1;
  db_query("UPDATE {system} SET weight = " . $weight . " WHERE name = 'taxonomy_defaults'");
  return $ret;
}