mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-15 00:54:41 +00:00
(mvc) small changes for https://github.com/opnsense/core/pull/789
This commit is contained in:
parent
036e661c89
commit
7c4bc83967
@ -67,7 +67,11 @@ class NetworkField extends BaseField
|
||||
*/
|
||||
public function setNetMaskRequired($value)
|
||||
{
|
||||
$this->internalNetMaskRequired = (trim(strtolower($value)) == 'y' || intval($value) == 1);
|
||||
if (trim(strtoupper($value)) == "Y") {
|
||||
$this->internalNetMaskRequired = true;
|
||||
} else {
|
||||
$this->internalNetMaskRequired = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -102,8 +102,7 @@ class NetworkValidator extends Validator implements ValidatorInterface
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else if($this->getOption('netMaskRequired') === true) {
|
||||
} elseif ($this->getOption('netMaskRequired') === true) {
|
||||
$result = false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user