Revision 7077addc
Added by Ermal Luçi over 10 years ago
etc/inc/captiveportal.inc | ||
---|---|---|
1028 | 1028 |
$rules = ""; |
1029 | 1029 |
|
1030 | 1030 |
if (is_array($config['captiveportal'][$cpzone]['passthrumac'])) { |
1031 |
$nentries = count($config['captiveportal'][$cpzone]['passthrumac']); |
|
1032 |
foreach ($config['captiveportal'][$cpzone]['passthrumac'] as $macent) { |
|
1033 |
if ($nentries > 100) |
|
1034 |
$rules .= captiveportal_passthrumac_configure_entry($macent, true); |
|
1035 |
else |
|
1036 |
$rules .= captiveportal_passthrumac_configure_entry($macent); |
|
1037 |
} |
|
1031 |
$tmprules = array_map('captiveportal_passthrumac_configure_entry', $config['captiveportal'][$cpzone]['passthrumac']); |
|
1032 |
$rules = implode("\n", $tmprules); |
|
1033 |
unset($tmprules); |
|
1038 | 1034 |
} |
1039 | 1035 |
|
1040 | 1036 |
return $rules; |
Also available in: Unified diff
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.