You are here

function tvi_install in Taxonomy Views Integrator 7

Same name and namespace in other branches
  1. 8 tvi.install \tvi_install()
  2. 6 tvi.install \tvi_install()

Implements hook_install().

File

./tvi.install, line 10
Install, update, and uninstall functions for the tvi module.

Code

function tvi_install() {

  // Ensure weights are ok.
  $view_info = db_select('system', 's')
    ->fields('s', array(
    'weight',
  ))
    ->condition('s.name', 'views')
    ->range(NULL, 1)
    ->execute()
    ->fetchObject();
  db_update('system')
    ->fields(array(
    'weight' => $view_info->weight + 5,
  ))
    ->condition('name', 'tvi')
    ->execute();
}