function apachesolr_set_stats_message in Apache Solr Search 7
Same name and namespace in other branches
- 8 apachesolr.module \apachesolr_set_stats_message()
- 5.2 apachesolr.module \apachesolr_set_stats_message()
- 6.3 apachesolr.module \apachesolr_set_stats_message()
- 6 apachesolr.module \apachesolr_set_stats_message()
- 6.2 apachesolr.module \apachesolr_set_stats_message()
Call drupal_set_message() with the text.
The text is translated with t() and substituted using Solr stats. @todo This is not according to drupal code standards
File
- ./
apachesolr.module, line 868 - Integration with the Apache Solr search application.
Code
function apachesolr_set_stats_message($text, $type = 'status', $repeat = FALSE) {
$env_id = apachesolr_default_environment();
try {
$solr = apachesolr_get_solr($env_id);
$stats_summary = $solr
->getStatsSummary();
drupal_set_message(check_plain(t($text, $stats_summary)), $type, FALSE);
} catch (Exception $e) {
apachesolr_log_exception($env_id, $e);
}
}