mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-15 17:16:59 +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);
|
$permittedIPs = $stmt->fetchAll(PDO::FETCH_COLUMN, 0);
|
||||||
$pool->put($pdo);
|
$pool->put($pdo);
|
||||||
|
|
||||||
// Clear the table and insert new values
|
// Manually clear the table by removing each entry
|
||||||
$permittedIPsTable->truncate();
|
foreach ($permittedIPsTable as $key => $value) {
|
||||||
|
$permittedIPsTable->del($key);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Insert new values
|
||||||
foreach ($permittedIPs as $ip) {
|
foreach ($permittedIPs as $ip) {
|
||||||
$permittedIPsTable->set($ip, ['addr' => $ip]);
|
$permittedIPsTable->set($ip, ['addr' => $ip]);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue