You are here

function _og_role_watchdog_history_rows in Role Watchdog 6

Same name and namespace in other branches
  1. 6.2 modules/og_role_watchdog/og_role_watchdog.pages.inc \_og_role_watchdog_history_rows()
  2. 7.2 modules/og_role_watchdog/og_role_watchdog.pages.inc \_og_role_watchdog_history_rows()
  3. 7 modules/og_role_watchdog/og_role_watchdog.pages.inc \_og_role_watchdog_history_rows()
2 calls to _og_role_watchdog_history_rows()
og_role_watchdog_grants in modules/og_role_watchdog/og_role_watchdog.pages.inc
og_role_watchdog_history in modules/og_role_watchdog/og_role_watchdog.pages.inc
Display tab page from menu callback.

File

modules/og_role_watchdog/og_role_watchdog.pages.inc, line 179
User page callbacks for the role_watchdog module.

Code

function _og_role_watchdog_history_rows($result, $roles, $actions) {
  $view_profile = user_access('access user profiles');
  while ($row = db_fetch_object($result)) {
    $group_name = empty($row->title) ? '-' : l($row->title, 'node/' . $row->nid);
    $row_data = array(
      format_date($row->stamp),
      $group_name,
      $roles[$row->rid],
      $actions[$row->action],
      $view_profile ? l($row->name, 'user/' . $row->uid) : $row->name,
    );
    if (isset($row->admin)) {
      array_unshift($row_data, $view_profile ? l($row->admin, 'user/' . $row->adminid) : $row->admin);
    }
    $rows[] = $row_data;
  }
  return $rows;
}