You are here

function block_revision_load in Block Revisions 6

Same name and namespace in other branches
  1. 7 block_revisions.module \block_revision_load()

File

./block_revisions.module, line 72

Code

function block_revision_load($vid, $delta) {
  $result = db_query('SELECT bid, vid, body, format, br.timestamp, br.log, u.uid, u.name FROM {boxes_revisions} br LEFT JOIN {users} u ON br.uid = u.uid WHERE br.bid = %d AND br.vid = %d', $delta, $vid);
  $revision = db_fetch_object($result);

  // If no record was found it the database, db_fetch_object will return
  // FALSE. Returning FALSE from a menu wildcard loader will in turn
  // result in a "Page not found". Perfect.
  return $revision;
}