mirror of
https://github.com/Spengreb/sync.git
synced 2026-05-15 03:52:06 +00:00
Fix incorrect clearing of visit history
This commit is contained in:
parent
08dabeda59
commit
55e6734bd1
1 changed files with 2 additions and 2 deletions
|
|
@ -923,12 +923,12 @@ function recordVisit(ip, name) {
|
||||||
|
|
||||||
// Keep most recent 5 records per IP
|
// Keep most recent 5 records per IP
|
||||||
results = db.querySync(createQuery(
|
results = db.querySync(createQuery(
|
||||||
["DELETE FROM aliases WHERE visit_id NOT IN (",
|
["DELETE FROM aliases WHERE ip=? AND visit_id NOT IN (",
|
||||||
"SELECT visit_id FROM (",
|
"SELECT visit_id FROM (",
|
||||||
"SELECT visit_id,time FROM aliases WHERE ip=? ORDER BY time DESC LIMIT 5",
|
"SELECT visit_id,time FROM aliases WHERE ip=? ORDER BY time DESC LIMIT 5",
|
||||||
") foo",
|
") foo",
|
||||||
");"].join(""),
|
");"].join(""),
|
||||||
[ip]
|
[ip, ip]
|
||||||
));
|
));
|
||||||
|
|
||||||
return results;
|
return results;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue