You are here

function user_revision_overview in User Revision 7.2

Same name and namespace in other branches
  1. 7 user_revision.pages.inc \user_revision_overview()

Generate an overview table of older revisions of a user.

1 string reference to 'user_revision_overview'
user_revision_menu in ./user_revision.module
Implements hook_menu().

File

./user_revision.pages.inc, line 11
UI pages for revisions, copy-paste from node.pages.inc.

Code

function user_revision_overview($viewed_user) {
  global $user;
  drupal_set_title(t('Revisions for %title', array(
    '%title' => $viewed_user->name,
  )), PASS_THROUGH);
  $header = array(
    t('Revision'),
    array(
      'data' => t('Operations'),
      'colspan' => 2,
    ),
  );
  $data = user_revision_list_build($viewed_user);
  $rows = array();
  foreach ($data as $item) {
    $rows[] = array_merge($item['row'], $item['operations']);
  }
  $build['user_revisions_table'] = array(
    '#theme' => 'table',
    '#rows' => $rows,
    '#header' => $header,
  );
  return $build;
}