Ticket #5889

Patch by Stephen Gunther
Reviewed by John Hixson

A more refined method of getting jail id's and names.