/** * Claring log messages */ public function process_bulk_action() { try { switch ($this->current_action()) { case 'emptyLog': $this->log->truncate(); $this->addNotice('updated', 'All log messages cleared!'); break; case 'delete': if (is_numeric($_GET['id'])) { $this->log->delete(array('id' => $_GET['id'])); $this->addNotice('updated', 'Log message deleted!'); } break; } } catch (RepositaryLogException $e) { $this->addNotice('error', $e->getMessage()); } }