Account actions rework on ip (Use single column for IP - VARCHAR(45)) (#289)

* Account actions rework on ip (Use single column for IP - VARCHAR(45))

* No foreach needed here
This commit is contained in:
Slawomir Boczek
2025-03-09 21:18:12 +01:00
committed by GitHub
parent 3c1210fefa
commit 7312383f73
7 changed files with 45 additions and 30 deletions

View File

@@ -9,6 +9,7 @@
*/
use MyAAC\Models\Account as AccountModel;
use MyAAC\Models\AccountAction;
use MyAAC\Models\Player;
defined('MYAAC') or die('Direct access not allowed!');
@@ -466,9 +467,8 @@ else if (isset($_REQUEST['search'])) {
</thead>
<tbody>
<?php
$accountActions = \MyAAC\Models\AccountAction::where('account_id', $account->getId())->orderByDesc('date')->get();
$accountActions = AccountAction::where('account_id', $account->getId())->orderByDesc('date')->get();
foreach ($accountActions as $i => $log):
$log->ip = ($log->ip != 0 ? long2ip($log->ip) : inet_ntop($log->ipv6));
?>
<tr>
<td><?php echo $i + 1; ?></td>