0.11-stable: Determine the first, previous and next ticket in a global ticket sequence by querying the database instead of assuming that they are `1`, `id - 1` and `id + 1`, respectively.
Closes #7795.
Authored by: rblank 2008-12-15
Parent: [r7766]
Child: [r7768]