You are here

function _prod_check_pathauto in Production check & Production monitor 7

Same name and namespace in other branches
  1. 6 prod_check.module \_prod_check_pathauto()

File

./prod_check.module, line 1869

Code

function _prod_check_pathauto($caller = 'internal') {
  $check = array();
  $title_ok = 'settings';
  $text_ok = 'Check the !link to verify if they are as you expect.';
  $title = 'Path auto';
  $path = 'admin/config/search/path/settings';
  if ($caller != 'internal') {
    $path = PRODCHECK_BASEURL . $path;
  }
  $check['prod_check_pathauto'] = array(
    '#title' => t($title),
    '#state' => module_exists('pathauto'),
    '#severity' => $caller == 'nagios' ? NAGIOS_STATUS_WARNING : PROD_CHECK_REQUIREMENT_WARNING,
    '#value_ok' => t('Enabled'),
    '#value_nok' => t('Disabled'),
    '#description_ok' => prod_check_ok_title($title_ok, $path, $text_ok),
    '#description_nok' => t('You have not enabled the !link module. This module is a must for search engines. Pathauto will automatically generate human readable URLs for every piece of content in the site.', prod_check_link_array($title, 'http://drupal.org/project/pathauto')),
    '#nagios_key' => 'PATH',
    '#nagios_type' => 'state',
  );
  return prod_check_execute_check($check, $caller);
}