Add auto token generate during Thread creation

This commit is contained in:
Dmitriy Simushev 2012-09-28 12:18:10 +00:00
parent 37b8fa7243
commit 9d19afcdf2

View File

@ -213,6 +213,7 @@ Class Thread {
if (empty($thread->id)) {
return false;
}
$thread->lastToken = self::nextToken();
return $thread;
}
@ -320,6 +321,15 @@ Class Thread {
return $val;
}
/**
* Create thread token
*
* @return int Thread token
*/
protected static function nextToken() {
return rand(99999, 99999999);
}
/**
* Implementation of the magic __get method
*