You are here

function taxonomy_breadcrumb_update_6001 in Taxonomy Breadcrumb 7

Same name and namespace in other branches
  1. 6 taxonomy_breadcrumb.install \taxonomy_breadcrumb_update_6001()

Sets weight of taxonomy_breadcrumb to be greater than core taxonomy module.

File

./taxonomy_breadcrumb.install, line 85
.install file for the taxonomy_breadcrumb module.

Code

function taxonomy_breadcrumb_update_6001() {

  // Ensure this module's weight is larger than the core taxonomy module.
  $weight = (int) db_query("SELECT weight FROM {system} WHERE name = :name", array(
    ':name' => 'taxonomy',
  ))
    ->fetchField();
  db_update('system')
    ->fields(array(
    'weight' => $weight + 1,
  ))
    ->condition('name', 'taxonomy_breadcrumb')
    ->execute();
}