Delete logs properly

This commit is contained in:
Nicolas Le Goff
2013-02-12 12:47:08 +01:00
parent c85701cfeb
commit 39a9d0aff3

View File

@@ -939,10 +939,7 @@ class databox extends base
public function clear_logs()
{
/**
* @todo clear log_docs log_search log_thumb log_view ?
*/
foreach (array('log') as $table) {
foreach (array('log', 'log_colls', 'log_docs', 'log_search', 'log_view', 'log_thumb') as $table) {
$sql = 'TRUNCATE ' . $table;
$stmt = $this->get_connection()->prepare($sql);
$stmt->execute();