text_noderef.install in Text or Nodereference 7
Same filename and directory in other branches
Module installation/uninstallation hooks.
File
text_noderef.installView 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
Name![]() |
Description |
---|---|
text_noderef_install | Implementation of hook_install(). |