You are here

function block_tracker_preprocess_block in Util 6.3

Same name and namespace in other branches
  1. 7 contribs/block_tracker/block_tracker.module \block_tracker_preprocess_block()

Implements hook_preprocess_HOOK(). Update the last used timestamp in the blocks table.

File

contribs/block_tracker/block_tracker.module, line 52
Track block usage.

Code

function block_tracker_preprocess_block($variables) {

  // Update the lastused timestamp in the block.
  db_query("UPDATE {blocks} SET lastused = %d WHERE bid = %d", time(), $variables['block']->bid);
}