You are here

function hierarchical_select_update_1 in Hierarchical Select 5.2

Same name and namespace in other branches
  1. 5.3 hierarchical_select.install \hierarchical_select_update_1()
  2. 6.3 hierarchical_select.install \hierarchical_select_update_1()

File

./hierarchical_select.install, line 23

Code

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

  // Ensure the Hierarchical Select module runs after the Taxonomy and Content
  // Taxonomy modules! This should not be necessary to do, but apparently some
  // idiot module developer is changing the weight of the Taxonomy module...
  $weight = db_result(db_query("SELECT weight FROM {system} WHERE name = 'taxonomy'"));
  $weight = max($weight, db_result(db_query("SELECT weight FROM {system} WHERE name = 'content_taxonomy'")));
  $weight++;
  $ret[] = update_sql("UPDATE {system} SET weight = {$weight} WHERE name  = 'hierarchical_select'");
  return $ret;
}