You are here

function _systeminfo_admin_overview_drupal in System Information 6.3

Same name and namespace in other branches
  1. 7.3 systeminfo.admin.inc \_systeminfo_admin_overview_drupal()
1 call to _systeminfo_admin_overview_drupal()
systeminfo_admin_overview in ./systeminfo.admin.inc
Menu callback; displays the overview page.

File

./systeminfo.admin.inc, line 56
Admin page callbacks for the systeminfo module.

Code

function _systeminfo_admin_overview_drupal() {
  $rows = array();
  $rows[] = array(
    t('Version'),
    VERSION,
  );
  $rows[] = array(
    t('Configuration file'),
    conf_path() . '/settings.php',
  );
  $cron_last = variable_get('cron_last', NULL);
  $rows[] = array(
    t('Cron maintenance tasks'),
    isset($cron_last) ? t('Last run !time ago', array(
      '!time' => format_interval(time() - $cron_last),
    )) : theme('placeholder', t('Not run yet')),
  );
  $install_profile = variable_get('install_profile', 'default');
  $profile_file = "./profiles/{$install_profile}/{$install_profile}.profile";
  if (file_exists($profile_file)) {
    require_once $profile_file;
    $function = $install_profile . '_profile_details';
    $profile_details = $function();
    $install_profile_name = $profile_details['name'];
  }
  else {
    $install_profile_name = $install_profile;
  }
  $rows[] = array(
    t('Install profile'),
    $install_profile_name,
  );
  $rows[] = array(
    t('Install time'),
    format_date(variable_get('install_time', 0), 'small'),
  );
  $rows[] = array(
    t('File system path'),
    file_directory_path(),
  );
  return theme('table', array(), $rows, array(
    'class' => 'systeminfo systeminfo-width50',
  ));
}