mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
whitespace / consistency for https://github.com/opnsense/core/pull/3976
This commit is contained in:
parent
82cdd740ee
commit
d7983fd99f
@ -176,10 +176,8 @@ class AliasUtilController extends ApiControllerBase
|
||||
{
|
||||
$this->sessionClose();
|
||||
if ($this->request->isPost() && $this->request->hasPost("address")) {
|
||||
$address = $this->request->getPost("address");
|
||||
|
||||
Config::getInstance()->lock();
|
||||
|
||||
$address = $this->request->getPost("address");
|
||||
$cnfAlias = $this->getAlias($alias);
|
||||
if ($cnfAlias !== null && in_array($cnfAlias->type, array('host', 'network'))) {
|
||||
// update local administration, remove address when found for static types
|
||||
@ -225,13 +223,11 @@ class AliasUtilController extends ApiControllerBase
|
||||
{
|
||||
$this->sessionClose();
|
||||
if ($this->request->isPost() && $this->request->hasPost("address")) {
|
||||
Config::getInstance()->lock();
|
||||
$address = $this->request->getPost("address");
|
||||
if (preg_match("/[^0-9a-f\:\.\/_]/", $address)) {
|
||||
return array("status" => "not_an_address");
|
||||
}
|
||||
|
||||
Config::getInstance()->lock();
|
||||
|
||||
$cnfAlias = $this->getAlias($alias);
|
||||
if ($cnfAlias !== null && in_array($cnfAlias->type, array('host', 'network'))) {
|
||||
// update local administration, add address when not found for static types
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user