It appears that the code from osticket to eticket is drastically different in some places

The sequential ID support from osticket wasn't very well written (not me knocking the developers, just relaying what they wrote in the code), so it appears to have been completely dropped in eTicket.
The code appears to be in /inc/class.ticket.php:188
function get_ticket() {
do {
mt_srand((double)microtime() *1000000);
$min = 100000;
$max = 999999;
$id = mt_rand($min, $max);
}
while (ValidID($id));
return $id;
}
function ValidID($id) {
global $db_table;
$id = preg_replace('/\D+/', '', $id); //sanitise
if (!empty($id)) {
$res = mysql_query("SELECT ID FROM " . $db_table['tickets'] . " WHERE ID=" . $id);
if ($res) {
if ($array = mysql_fetch_assoc($res)) {
return $array['ID'];
}
}
}
}
I'm going to write my own id generator (since my company wants something more specific than just incremental or random), but if anyone wants to fart around with custom ID generation, this is the place to start
