function apachesolr_set_stats_message in Apache Solr Search 6
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.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.
2 calls to apachesolr_set_stats_message()
- _apachesolr_nodeapi_delete in ./
apachesolr.module - Helper function for hook_nodeapi().
- _apachesolr_nodeapi_update in ./
apachesolr.module - Helper function for hook_nodeapi().
File
- ./
apachesolr.module, line 687 - 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(t($text, $stats_summary), $type, FALSE);
} catch (Exception $e) {
watchdog('Apache Solr', nl2br(check_plain($e
->getMessage())), NULL, WATCHDOG_ERROR);
}
}