firewall: update traffic shaper model and kill old __empty__ trick

It was only used in one place and superseded by <BlankDesc/>.
This commit is contained in:
Franco Fichtner 2023-08-31 10:44:31 +02:00
parent 187aca0fbc
commit 31ccea6b79
2 changed files with 3 additions and 12 deletions

View File

@ -45,11 +45,7 @@ class OptionField extends BaseListField
// copy options to internal structure, make sure we don't copy in array structures
foreach ($data as $key => $value) {
if (!is_array($value)) {
if ($key === "__empty__") {
$this->internalOptionList[""] = gettext($value);
} else {
$this->internalOptionList[$key] = gettext($value);
}
$this->internalOptionList[$key] = gettext($value);
}
}
}

View File

@ -1,9 +1,7 @@
<model>
<mount>//OPNsense/TrafficShaper</mount>
<version>1.0.3</version>
<description>
OPNsense traffic shaper
</description>
<description>OPNsense traffic shaper</description>
<items>
<pipes>
<pipe type="ArrayField">
@ -56,7 +54,6 @@
</buckets>
<scheduler type="OptionField">
<Required>N</Required>
<default></default>
<BlankDesc>Weighted Fair Queueing</BlankDesc>
<OptionValues>
<fifo>FIFO</fifo>
@ -251,7 +248,6 @@
</interface>
<interface2 type="InterfaceField">
<Required>N</Required>
<default></default>
<AllowDynamic>Y</AllowDynamic>
<filters>
<enable>/^(?!0).*$/</enable>
@ -343,9 +339,8 @@
</dscp>
<direction type="OptionField">
<Required>N</Required>
<default></default>
<BlankDesc>both</BlankDesc>
<OptionValues>
<__empty__>both</__empty__>
<in>in</in>
<out>out</out>
</OptionValues>