mirror of
https://github.com/billz/raspap-webgui.git
synced 2025-12-26 23:26:47 +01:00
Minor: comments
This commit is contained in:
@@ -375,7 +375,6 @@ class DhcpcdManager
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$matched && !preg_match('/^interface/', $line)) {
|
if (!$matched && !preg_match('/^interface/', $line)) {
|
||||||
// check if this line matches a key we've already processed (prevents duplicates)
|
|
||||||
$is_duplicate = false;
|
$is_duplicate = false;
|
||||||
foreach ($processed_keys as $processed_key) {
|
foreach ($processed_keys as $processed_key) {
|
||||||
if (strpos($line, $processed_key) === 0) {
|
if (strpos($line, $processed_key) === 0) {
|
||||||
@@ -383,7 +382,6 @@ class DhcpcdManager
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// also check if the line already exists in config (for non-static settings like nogateway)
|
|
||||||
if (!$is_duplicate && !in_array($line, $config, true)) {
|
if (!$is_duplicate && !in_array($line, $config, true)) {
|
||||||
$config[] = $line;
|
$config[] = $line;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user