mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-13 16:14:40 +00:00
plugins: protect calls to functions as done elsewhere
This commit is contained in:
parent
0a972db96d
commit
baa813eb95
@ -294,8 +294,11 @@ if (isset($config['hasync']) && is_array($config['hasync'])) {
|
||||
$section_cnf['synchronizeschedules'] = 'schedules';
|
||||
$section_cnf['synchronizeshaper'] = 'OPNsense.TrafficShaper';
|
||||
$section_cnf['synchronizecaptiveportal'] = 'OPNsense.captiveportal';
|
||||
foreach (plugins_xmlrpc_sync() as $syncid => $syncconf) {
|
||||
$section_cnf['synchronize'.$syncid] = $syncconf['section'];
|
||||
|
||||
if (function_exists('plugins_xmlrpc_sync')) {
|
||||
foreach (plugins_xmlrpc_sync() as $syncid => $syncconf) {
|
||||
$section_cnf['synchronize'.$syncid] = $syncconf['section'];
|
||||
}
|
||||
}
|
||||
|
||||
$sections = array();
|
||||
|
||||
@ -41,7 +41,14 @@ $checkbox_names = array('pfsyncenabled', 'synchronizeusers', 'synchronizeauthser
|
||||
'synchronizestaticroutes', 'synchronizelb', 'synchronizevirtualip',
|
||||
'synchronizednsforwarder','synchronizednsresolver', 'synchronizeshaper', 'synchronizecaptiveportal'
|
||||
);
|
||||
foreach (array_keys(plugins_xmlrpc_sync()) as $key) {
|
||||
|
||||
$syncplugins = array();
|
||||
|
||||
if (function_exists('plugins_xmlrpc_sync')) {
|
||||
$syncplugins = plugins_xmlrpc_sync();
|
||||
}
|
||||
|
||||
foreach (array_keys($syncplugins) as $key) {
|
||||
$checkbox_names[] = 'synchronize'.$key;
|
||||
}
|
||||
|
||||
@ -359,7 +366,7 @@ include("head.inc");
|
||||
</tr>
|
||||
<!-- Hook xmlrpc sync plugins -->
|
||||
<?php
|
||||
foreach (plugins_xmlrpc_sync() as $syncid => $synccnf):?>
|
||||
foreach ($syncplugins as $syncid => $synccnf):?>
|
||||
<tr>
|
||||
<td><a id="help_for_synchronize<?=$syncid?>" href="#" class="showhelp"><i class="fa fa-info-circle"></i></a> <?=$synccnf['description'];?></td>
|
||||
<td>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user