Skip to content

Commit 02fd080

Browse files
committed
Releasing 1.0.23
2 parents 342e27c + 7c5a8b8 commit 02fd080

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/WebApp/DataModel/LogDAO.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ 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);
33-
$sql = 'DELETE * FROM '.$this->database->quoteName($this->tableName).' WHERE log_date < '.$this->database->prepareValue($threshold);
38+
$sql = 'DELETE FROM '.$this->database->quoteName($this->tableName).' WHERE log_date < '.$this->database->prepareValue($threshold);
3439
$this->database->query($sql);
3540
}
3641
}

0 commit comments

Comments
 (0)