Commit 0a8686ac authored by catch's avatar catch

Issue #2494221 by david_garcia, dagmar: Slow Log/Watchdog clear when there are lots of data

parent da0645c1
......@@ -65,7 +65,7 @@ public function getCancelUrl() {
*/
public function submitForm(array &$form, FormStateInterface $form_state) {
$_SESSION['dblog_overview_filter'] = array();
$this->connection->delete('watchdog')->execute();
$this->connection->truncate('watchdog')->execute();
drupal_set_message($this->t('Database log cleared.'));
$form_state->setRedirectUrl($this->getCancelUrl());
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment