mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ticket #3932 Use array_map to get more parallelism when there are many entries. This makes it not reach the execution timeout with large entries.
This commit is contained in:
parent
7001542e3e
commit
aa685f7a6d
@ -1028,13 +1028,9 @@ function captiveportal_passthrumac_configure($lock = false) {
|
||||
$rules = "";
|
||||
|
||||
if (is_array($config['captiveportal'][$cpzone]['passthrumac'])) {
|
||||
$nentries = count($config['captiveportal'][$cpzone]['passthrumac']);
|
||||
foreach ($config['captiveportal'][$cpzone]['passthrumac'] as $macent) {
|
||||
if ($nentries > 100)
|
||||
$rules .= captiveportal_passthrumac_configure_entry($macent, true);
|
||||
else
|
||||
$rules .= captiveportal_passthrumac_configure_entry($macent);
|
||||
}
|
||||
$tmprules = array_map('captiveportal_passthrumac_configure_entry', $config['captiveportal'][$cpzone]['passthrumac']);
|
||||
$rules = implode("\n", $tmprules);
|
||||
unset($tmprules);
|
||||
}
|
||||
|
||||
return $rules;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user