1
0
mirror of https://github.com/wbbaddons/Tims-Chat.git synced 2024-12-21 21:30:08 +00:00

Use random_int() instead of microtime() to generate temproom names

This fixes the deprecated implicit conversion from float to int on PHP 8+.
This commit is contained in:
Maximilian Mader 2023-11-18 23:16:56 +01:00 committed by Tim Düsterhus
parent b0120e16c0
commit 95d7f4a961
Signed by: TimWolla
GPG Key ID: 8FF75566094168AF
2 changed files with 2 additions and 2 deletions

View File

@ -130,7 +130,7 @@
<item name="chat.room.userList.away"><![CDATA[Abwesend{if $user.away}: {$user.away}{/if}]]></item> <item name="chat.room.userList.away"><![CDATA[Abwesend{if $user.away}: {$user.away}{/if}]]></item>
<item name="chat.room.userList.moderator"><![CDATA[Moderator]]></item> <item name="chat.room.userList.moderator"><![CDATA[Moderator]]></item>
<item name="chat.room.userList.mute"><![CDATA[Stumm]]></item> <item name="chat.room.userList.mute"><![CDATA[Stumm]]></item>
<item name="chat.room.temporary.blueprint"><![CDATA[{assign var='microtime' value=true|microtime}Temproom#{$microtime*1000%1000} ({$user->username})]]></item> <item name="chat.room.temporary.blueprint"><![CDATA[{assign var='number' value=1000|random_int:9999}Temproom#{$number} ({$user->username})]]></item>
</category> </category>
<category name="chat.room.condition"> <category name="chat.room.condition">

View File

@ -130,7 +130,7 @@
<item name="chat.room.userList.away"><![CDATA[Away{if $user.away}: {$user.away}{/if}]]></item> <item name="chat.room.userList.away"><![CDATA[Away{if $user.away}: {$user.away}{/if}]]></item>
<item name="chat.room.userList.moderator"><![CDATA[Moderator]]></item> <item name="chat.room.userList.moderator"><![CDATA[Moderator]]></item>
<item name="chat.room.userList.mute"><![CDATA[Mute]]></item> <item name="chat.room.userList.mute"><![CDATA[Mute]]></item>
<item name="chat.room.temporary.blueprint"><![CDATA[{assign var='microtime' value=true|microtime}Temproom#{$microtime*1000%1000} ({$user->username})]]></item> <item name="chat.room.temporary.blueprint"><![CDATA[{assign var='number' value=1000|random_int:9999}Temproom#{$number} ({$user->username})]]></item>
</category> </category>
<category name="chat.room.condition"> <category name="chat.room.condition">