src: improve spacing in wpad additions

This commit is contained in:
Franco Fichtner 2018-07-18 08:20:40 +02:00
parent 5f6ca0163c
commit 7da7bed7d8
3 changed files with 36 additions and 28 deletions

View File

@ -568,6 +568,7 @@ function unbound_add_host_entries()
}
}
}
if (isset($config['unbound']['enable_wpad'])) {
$webui_protocol = !empty($config['system']['webgui']['protocol']) ? $config['system']['webgui']['protocol'] : 'https';
$webui_port = !empty($config['system']['webgui']['port']) ? $config['system']['webgui']['port'] : 443;

View File

@ -82,7 +82,6 @@ class SettingsController extends ApiMutableModelControllerBase
return array();
}
/**
* update remote blacklist item
* @param string $uuid
@ -242,8 +241,6 @@ class SettingsController extends ApiMutableModelControllerBase
return $result;
}
/* PAC RULE */
/**
*
* search PAC Rule
@ -254,6 +251,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->sessionClose();
return $this->searchBase('pac.rule', array("enabled", "description", "proxies", "matches"), "description");
}
/**
* retrieve PAC Rule or return defaults
* @param $uuid item unique id
@ -264,6 +262,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->sessionClose();
return array("pac" => $this->getBase('rule', 'pac.rule', $uuid));
}
/**
* add new PAC Rule and set with attributes from post
* @return array
@ -273,6 +272,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->pac_set_helper();
return $this->addBase('rule', 'pac.rule');
}
/**
* update PAC Rule
* @param string $uuid
@ -284,6 +284,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->pac_set_helper();
return $this->setBase('rule', 'pac.rule', $uuid);
}
/**
* toggle PAC Rule by uuid (enable/disable)
* @param $uuid item unique id
@ -293,6 +294,7 @@ class SettingsController extends ApiMutableModelControllerBase
{
return $this->toggleBase('pac.rule', $uuid);
}
/**
* delete PAC Rule by uuid
* @param $uuid item unique id
@ -313,6 +315,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->sessionClose();
return $this->searchBase('pac.proxy', array("enabled","proxy_type", "name", "url", "description"), "description");
}
/**
* retrieve PAC Proxy or return defaults
* @param $uuid item unique id
@ -323,6 +326,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->sessionClose();
return array("pac" => $this->getBase('proxy', 'pac.proxy', $uuid));
}
/**
* add new PAC Proxy and set with attributes from post
* @return array
@ -332,6 +336,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->pac_set_helper();
return $this->addBase('proxy', 'pac.proxy');
}
/**
* update PAC Proxy
* @param string $uuid
@ -343,6 +348,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->pac_set_helper();
return $this->setBase('proxy', 'pac.proxy', $uuid);
}
/**
* delete PAC Proxy by uuid
* @param $uuid item unique id
@ -354,7 +360,6 @@ class SettingsController extends ApiMutableModelControllerBase
}
/**
*
* search PAC Match
* @return array
*/
@ -363,6 +368,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->sessionClose();
return $this->searchBase('pac.match', array("enabled", "name", "description", "negate", "match_type"), "name");
}
/**
* retrieve PAC Match or return defaults
* @param $uuid item unique id
@ -373,6 +379,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->sessionClose();
return array("pac" => $this->getBase('match', 'pac.match', $uuid));
}
/**
* add new PAC Proxy and set with attributes from post
* @return array
@ -382,6 +389,7 @@ class SettingsController extends ApiMutableModelControllerBase
$this->pac_set_helper();
return $this->addBase('match', 'pac.match');
}
/**
* update PAC Rule
* @param string $uuid

View File

@ -1,32 +1,32 @@
<?php
/**
* Copyright (C) 2015 Deciso B.V.
* Copyright (C) 2017 Fabian Franz
/*
* Copyright (C) 2015 Deciso B.V.
* Copyright (C) 2017 Fabian Franz
* All rights reserved.
*
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
* OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Proxy;
use OPNsense\Base\BaseModel;
@ -39,7 +39,6 @@ class Proxy extends BaseModel
{
public function performValidation($validateFullModel = false)
{
// perform standard validations
$result = parent::performValidation($validateFullModel);
// add validation for PAC match