mirror of
https://github.com/Mibew/tray.git
synced 2025-01-22 18:10:34 +03:00
Add auto token generate during Thread creation
This commit is contained in:
parent
37b8fa7243
commit
9d19afcdf2
@ -213,6 +213,7 @@ Class Thread {
|
|||||||
if (empty($thread->id)) {
|
if (empty($thread->id)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
$thread->lastToken = self::nextToken();
|
||||||
return $thread;
|
return $thread;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -320,6 +321,15 @@ Class Thread {
|
|||||||
return $val;
|
return $val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create thread token
|
||||||
|
*
|
||||||
|
* @return int Thread token
|
||||||
|
*/
|
||||||
|
protected static function nextToken() {
|
||||||
|
return rand(99999, 99999999);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Implementation of the magic __get method
|
* Implementation of the magic __get method
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user