You are here

text_noderef.install in Text or Nodereference 7

Same filename and directory in other branches
  1. 6 text_noderef.install

Module installation/uninstallation hooks.

File

text_noderef.install
View source
<?php

/**
 * @file
 * Module installation/uninstallation hooks.
 */

/**
 * Implementation of hook_install().
 */
function text_noderef_install() {

  // Make sure this module is loaded after text.module's fields.
  // See text_noderef_form_field_ui_field_edit_form_alter().
  $query = db_select('system', 's');
  $query
    ->addExpression('MAX(weight)', 'maxweight');
  $weight = $query
    ->condition('name', 'text')
    ->execute()
    ->fetchField();
  db_update('system')
    ->fields(array(
    'weight' => 1 + $weight,
  ))
    ->condition('name', 'text_noderef')
    ->execute();
}

Functions

Namesort descending Description
text_noderef_install Implementation of hook_install().