You are here

systeminfo.module in System Information 7.2

This module displays information about the current state of the Drupal installation and system environment.

File

systeminfo.module
View source
<?php

/**
 * @file
 * This module displays information about the current state of the Drupal
 * installation and system environment.
 */

/**
 * Implements hook_help().
 */
function systeminfo_help($path, $arg) {
  switch ($path) {
    case 'admin/help#systeminfo':
      $output = '<p>' . t('This module displays information about the current state of the Drupal installation and system environment.') . '</p>';
      $output .= '<p>' . t('For more information, see the online handbook entry for <a href="@systeminfo">System Information module</a>.', array(
        '@systeminfo' => 'http://drupal.org/project/systeminfo',
      )) . '</p>';
      return $output;
    case 'admin/reports/systeminfo':
      $output = '<p>' . t('Information about the current state of the Drupal installation and system environment.') . '</p>';
      return $output;
    case 'admin/reports/systeminfo/settings':
      $output = '<p>' . t('Configure the display of System Information.') . '</p>';
      return $output;
    case 'admin/reports/systeminfo/drupal':
      $output = '<p>' . t('Information about the current state of the Drupal installation.') . '</p>';
      return $output;
  }
}

/**
 * Implements hook_permission().
 */
function systeminfo_permission() {
  $perm = array();
  $perm['access system information'] = array(
    'title' => t('Access system information'),
  );
  $perm['administer system information'] = array(
    'title' => t('Administer system information'),
  );
  return $perm;
}

/**
 * Implements of hook_menu().
 */
function systeminfo_menu() {
  $menu = array();
  $menu['admin/reports/systeminfo'] = array(
    'title' => 'System information',
    'description' => 'Display current state of the Drupal installation and system environment.',
    'page callback' => 'systeminfo_admin_overview',
    'access arguments' => array(
      'access system information',
    ),
    'file' => 'systeminfo.admin.inc',
  );
  $menu['admin/reports/systeminfo/overview'] = array(
    'title' => 'Overview',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => -10,
  );
  $menu['admin/reports/systeminfo/settings'] = array(
    'title' => 'Settings',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'systeminfo_admin_settings',
    ),
    'access arguments' => array(
      'administer system information',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 10,
    'file' => 'systeminfo.admin.inc',
  );
  $menu['admin/reports/systeminfo/drupal'] = array(
    'title' => 'Drupal',
    'description' => 'Display current state of the Drupal installation.',
    'page callback' => 'systeminfo_admin_drupal',
    'access arguments' => array(
      'access system information',
    ),
    'weight' => 0,
    'file' => 'systeminfo.admin.drupal.inc',
  );
  $menu['admin/reports/systeminfo/php'] = array(
    'title' => 'PHP',
    'description' => 'Display current state of PHP.',
    'page callback' => 'systeminfo_admin_php',
    'access arguments' => array(
      'access system information',
    ),
    'weight' => 1,
    'file' => 'systeminfo.admin.php.inc',
  );
  $menu['admin/reports/systeminfo/database'] = array(
    'title' => 'Database system',
    'description' => 'Display current state of the database system.',
    'page callback' => 'systeminfo_admin_database',
    'access arguments' => array(
      'access system information',
    ),
    'weight' => 2,
    'file' => 'systeminfo.admin.database.inc',
  );
  $menu['admin/reports/systeminfo/database/content'] = array(
    'title' => 'Database table content',
    'page callback' => 'systeminfo_admin_database_table_content',
    'access arguments' => array(
      'access system information',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'systeminfo.admin.database.inc',
  );
  $menu['admin/reports/systeminfo/database/structure'] = array(
    'title' => 'Database table structure',
    'page callback' => 'systeminfo_admin_database_table_structure',
    'access arguments' => array(
      'access system information',
    ),
    'type' => MENU_CALLBACK,
    'file' => 'systeminfo.admin.database.inc',
  );
  return $menu;
}

Functions

Namesort descending Description
systeminfo_help Implements hook_help().
systeminfo_menu Implements of hook_menu().
systeminfo_permission Implements hook_permission().