mirror of
https://github.com/unraid/webgui.git
synced 2026-01-07 01:59:52 -06:00
Network rules: fix double quote display
This commit is contained in:
@@ -19,7 +19,7 @@ Cond="file_exists('/boot/config/network-rules.cfg')"
|
||||
$cfg = '/boot/config/network-rules.cfg';
|
||||
|
||||
function strip($item) {
|
||||
[$key, $val] = my_explode('"', $item);
|
||||
[$key, $val] = explode('"', $item);
|
||||
return $val;
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ exec("grep -Po '^# \K.*' $cfg", $info);
|
||||
|
||||
$link = []; $i = 0;
|
||||
foreach ($rules as $rule) {
|
||||
[$mac, $eth] = array_map('strip', explode(',', $rule));
|
||||
[$mac, $eth] = array_map('strip', my_explode(',', $rule));
|
||||
if (str_starts_with($eth, 'eth')) {
|
||||
$link[$eth]['mac'] = $mac;
|
||||
$link[$eth]['info'] = $info[$i];
|
||||
|
||||
Reference in New Issue
Block a user