maxlength.install in Maxlength 7
Same filename and directory in other branches
Install file for the maxlenght module
File
maxlength.installView source
<?php
/**
* @file
* Install file for the maxlenght module
*/
/**
* Implementation of hook_istall().
*/
function maxlength_install() {
db_update('system')
->fields(array(
'weight' => 1,
))
->condition('name', 'maxlength')
->execute();
}
/**
* Implementation of hook_unistall().
*
* @todo clean up CCK field variables as well
*/
function maxlength_uninstall() {
foreach (node_type_get_types() as $type => $name) {
$labels = array(
'title',
'js_title',
'text_title',
'body',
'js_body',
'text_body',
);
foreach ($labels as $label) {
variable_del('maxlength_' . $label . '_' . $type);
}
}
}
Functions
Name | Description |
---|---|
maxlength_install | Implementation of hook_istall(). |
maxlength_uninstall | Implementation of hook_unistall(). |