forked from github/server
only updating firstturn if it's less than before or was nul
This commit is contained in:
parent
6b27b2a0c2
commit
d4a0c6c06c
|
@ -1144,7 +1144,7 @@ parse_quit(void)
|
|||
}
|
||||
} else {
|
||||
if (f->subscription) {
|
||||
sql_print(("UPDATE subscriptions SET status='ACTIVE', lastturn=%d, firstturn=%d, password='%s' WHERE id=%u;\n",
|
||||
sql_print(("UPDATE subscriptions SET status='ACTIVE', lastturn=%d, firstturn=greatest(firstturn,%d), password='%s' WHERE id=%u;\n",
|
||||
f->lastorders, f->lastorders-f->age,
|
||||
f->override, f->subscription));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue