function elasticsearch_watchdog_clear_log_submit in Elasticsearch Connector 7.5
Same name and namespace in other branches
- 7 modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc \elasticsearch_watchdog_clear_log_submit()
- 7.2 modules/elasticsearch_watchdog/elasticsearch_watchdog.admin.inc \elasticsearch_watchdog_clear_log_submit()
Form submission handler for elasticsearch_watchdog_clear_log_form().
1 string reference to 'elasticsearch_watchdog_clear_log_submit'
- elasticsearch_watchdog_clear_log_form in modules/
elasticsearch_watchdog/ elasticsearch_watchdog.admin.inc - Form constructor for the form that clears out the log.
File
- modules/
elasticsearch_watchdog/ elasticsearch_watchdog.admin.inc, line 700 - Created on Jan 06, 2014
Code
function elasticsearch_watchdog_clear_log_submit() {
$_SESSION['elasticsearch_watchdog_overview_filter'] = array();
// Delete the index and recreate it.
$client_id = elasticsearch_watchdog_get_cluster_id();
$index = elasticsearch_watchdog_get_index_name();
if (!empty($client_id)) {
$client = elasticsearch_connector_get_client_by_id($client_id);
elasticsearch_connector_recreate_index($client, $index);
}
}