mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 09:07:00 +02:00
Tiny fix
This commit is contained in:
parent
8ff945e475
commit
bc3a55d6b4
1 changed files with 6 additions and 2 deletions
|
@ -438,8 +438,12 @@ function updatePermittedIPs($pool, $permittedIPsTable) {
|
|||
$permittedIPs = $stmt->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||
$pool->put($pdo);
|
||||
|
||||
// Clear the table and insert new values
|
||||
$permittedIPsTable->truncate();
|
||||
// Manually clear the table by removing each entry
|
||||
foreach ($permittedIPsTable as $key => $value) {
|
||||
$permittedIPsTable->del($key);
|
||||
}
|
||||
|
||||
// Insert new values
|
||||
foreach ($permittedIPs as $ip) {
|
||||
$permittedIPsTable->set($ip, ['addr' => $ip]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue