You are here

function block_revision_list in Block Revisions 7

Same name and namespace in other branches
  1. 6 block_revisions.admin.inc \block_revision_list()

Return revision information for the given block.

1 call to block_revision_list()
block_revisions_overview in ./block_revisions.admin.inc
Menu callback for the revisions overview page.

File

./block_revisions.admin.inc, line 145
Admin functions and page callbacks for the Block Revisions module.

Code

function block_revision_list($delta) {
  $revisions = array();
  $query = "SELECT br.vid, br.body, br.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 = :bid ORDER BY timestamp DESC";
  $result = db_query($query, array(
    ':bid' => $delta,
  ));
  foreach ($result as $revision) {
    $revisions[$revision->vid] = $revision;
  }
  return $revisions;
}