block_tracker.install in Util 7
Same filename and directory in other branches
Install code for Block Tracker add-on to Util.
File
contribs/block_tracker/block_tracker.installView source
<?php
/**
* @file
* Install code for Block Tracker add-on to Util.
*/
/**
* Implements hook_install();
* Add a last used timestamp to the blocks table.
*/
function block_tracker_install() {
db_add_field('block', 'lastused', array(
'description' => 'The Unix timestamp when the node was last used.',
'type' => 'int',
'not null' => TRUE,
'default' => 0,
));
}
/**
* Implements hook_uninstall();
* Remove module variables.
*/
function block_tracker_uninstall() {
db_drop_field('block', 'lastused');
}
Functions
Name![]() |
Description |
---|---|
block_tracker_install | Implements hook_install(); Add a last used timestamp to the blocks table. |
block_tracker_uninstall | Implements hook_uninstall(); Remove module variables. |