Skip to content

Commit db18227

Browse files
committed
Delete all log entries
1 parent 30fc47f commit db18227

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/WebApp/DataModel/LogDAO.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public function createTable() {
2828
return TRUE;
2929
}
3030

31+
public function deleteAll() {
32+
$sql = 'DELETE * FROM '.$this->database->quoteName($this->tableName);
33+
$this->database->query($sql);
34+
}
35+
3136
public function housekeeping($days = 30) {
3237
$this->threshold = new Date(time()-$days*Date::SECONDS_PER_DAY, WFW_TIMEZONE);
3338
$sql = 'DELETE * FROM '.$this->database->quoteName($this->tableName).' WHERE log_date < '.$this->database->prepareValue($threshold);

0 commit comments

Comments
 (0)