function statspro_path_aggregated_mandatory in Statistics Pro 6.2
Informs if the mandatory dependencies for path aggregate reports generation are met.
Return value
boolean
5 calls to statspro_path_aggregated_mandatory()
- statspro_path_aggregated in ./
statspro_path_aggregated.inc - Callback function for path aggregated page.
- statspro_path_aggregator_add in ./
statspro_path_aggregated.inc - statspro_path_aggregator_delete in ./
statspro_path_aggregated.inc - Delete path aggregator.
- statspro_path_aggregator_edit in ./
statspro_path_aggregated.inc - Edit path aggregator.
- statspro_path_aggregator_list in ./
statspro_path_aggregated.inc
File
- ./
statspro_settings.inc, line 129
Code
function statspro_path_aggregated_mandatory() {
$dependency_ok = TRUE;
if (module_exists('statistics')) {
if (variable_get('statistics_enable_access_log', 0) == 0) {
// Statistics module enabled but access log disabled.
$message = t("The core %statistics_module module is enabled but the %access_log_setting\n setting in the !access_log page isn't. You can't have path aggregated\n statistics without it. Please consider enabling it to enable path aggregated\n reports. Remember that you should not discard access logs for as long as you\n want path aggregated reports.", array(
'%statistics_module' => t('Statistics'),
'%access_log_setting' => t('Enable access log'),
'!access_log' => l(t('Access log settings'), 'admin/reports/settings'),
));
drupal_set_message($message, 'error');
$dependency_ok = FALSE;
}
}
else {
// Statistics module disabled.
$message = t("The core %statistics_module module is not enabled. You can't have path\n aggregated statistics without it. Please consider enabling it and the\n %access_log_setting setting in the %access_log page. Remember that you should\n not discard access logs for as long as you want path aggregated reports.", array(
'%statistics_module' => t('Statistics'),
'%access_log_setting' => t('Enable access log'),
'%access_log' => t('Access log settings'),
));
drupal_set_message($message, 'error');
$dependency_ok = FALSE;
}
return $dependency_ok;
}