You are here

function statspro_optional_dependency_statistics in Statistics Pro 6.2

1 call to statspro_optional_dependency_statistics()
statspro_main_admin_settings_form in ./statspro_admin_settings.inc
Main admin settings form.

File

./statspro_admin_settings.inc, line 75

Code

function statspro_optional_dependency_statistics(&$form) {
  $dependency_ok = module_exists('statistics');
  $form['optional_requirements']['statistics_module_wrapper'] = array(
    '#type' => 'fieldset',
    '#title' => t('Statistics module'),
    '#collapsible' => TRUE,
    '#collapsed' => $dependency_ok,
  );
  $message = "\n<p>" . t("The core %statistics_module module is required\n    for the following optional reports:", array(
    '%statistics_module' => t('Statistics'),
  )) . "</p>\n";
  $message .= sprintf(<<<LIST
<ul>
  <li>%s</li>
  <li>%s</li>
</ul>
LIST
, t('Path aggregated'), t('Page visualization'));
  if (!$dependency_ok) {
    $message .= "\n<p>" . t("You should also enable the %access_log_setting setting in the %access_log\n      page.", array(
      '%access_log_setting' => t('Enable access log'),
      '%access_log' => t('Access log settings'),
    )) . "</p>\n";
  }
  $message .= "\n<p>" . t("The core %statistics_module module is currently %status.", array(
    '%statistics_module' => t('Statistics'),
    '%status' => $dependency_ok ? t('Enabled') : t('Disabled'),
  )) . "</p>\n";
  $form['optional_requirements']['statistics_module_wrapper']['statistics_module'] = array(
    '#value' => $message,
  );
}