function apachesolr_set_stats_message in Apache Solr Search 8
Same name and namespace in other branches
- 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()
- 7 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 874 - Integration with the Apache Solr search application.
Code
function apachesolr_set_stats_message($text, $type = 'status', $repeat = FALSE) {
try {
$solr = apachesolr_get_solr();
$stats_summary = $solr
->getStatsSummary();
drupal_set_message(check_plain(t($text, $stats_summary)), $type, FALSE);
} catch (Exception $e) {
watchdog('Apache Solr', nl2br(check_plain($e
->getMessage())), NULL, WATCHDOG_ERROR);
}
}