Restrict machine and component IDs to a basic pattern

This commit is contained in:
Skylar Ittner 2020-06-26 20:40:55 -06:00
parent 3db2e97e6c
commit 1866b59040

View File

@ -281,13 +281,13 @@ class Machine implements JsonSerializable {
/**
* Generate a random ID number that is not in use.
* Default: 680######
* Default: 680[1-3]######
* @global $database
* @param int $min Optional minimum number.
* @param int $max Optional maximum number.
* @return int
*/
public static function generateId(int $min = 680100000, int $max = 680999999): int {
public static function generateId(int $min = 680100000, int $max = 680399999): int {
global $database;
do {