This commit is contained in:
Ad Schellevis
2018-11-29 21:10:07 +01:00
parent d3f7e3d397
commit 94c0467d80
5 changed files with 6 additions and 6 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ function frr_firewall($fw)
$ospf = new \OPNsense\Quagga\OSPF();
if ((string)$ospf->enabled == '1') {
foreach ($ospf->networks->network->__items as $network) {
foreach ($ospf->networks->network->iterateItems() as $network) {
if ((string)$network->enabled == '1') {
$fw->registerFilterRule(
1, /* priority */
@@ -30,7 +30,7 @@ function ftpproxy_enabled()
{
$model = new \OPNsense\FtpProxy\FtpProxy();
foreach ($model->ftpproxy->__items as $server) {
foreach ($model->ftpproxy->iterateItems() as $server) {
if ($server->enabled == '1') {
return true;
}
@@ -40,7 +40,7 @@ function quagga_firewall($fw)
{
if (ospfd_enabled()) {
$ospf = new \OPNsense\Quagga\OSPF();
foreach ($ospf->networks->network->__items as $network) {
foreach ($ospf->networks->network->iterateItems() as $network) {
if ((string)$network->enabled == '1') {
$fw->registerFilterRule(
1, /* priority */
@@ -30,7 +30,7 @@ function tinc_enabled()
{
$mdl = new \OPNsense\Tinc\Tinc();
foreach ($mdl->networks->network->__items as $network) {
foreach ($mdl->networks->network->iterateItems() as $network) {
if ($network->enabled == '1') {
return true;
}
@@ -49,7 +49,7 @@ function tinc_syslog()
);
$mdl = new \OPNsense\Tinc\Tinc();
foreach ($mdl->networks->network->__items as $network) {
foreach ($mdl->networks->network->iterateItems() as $network) {
if ($network->enabled == '1') {
$logfacilities['tinc']['facility'][] = 'tinc.'.$network->name;
}
@@ -37,7 +37,7 @@ use \OPNsense\Tor\HiddenService;
$hostnames = array();
$services = new HiddenService();
foreach ($services->service->__items as $service) {
foreach ($services->service->iterateItems() as $service) {
$directory_name = ((string)$service->name);
$hostnamefile = TOR_DATA_DIR . '/' . $directory_name . '/hostname';
if (file_exists($hostnamefile)) {