config: push plugins.inc to a vital spot to be included once only

This commit is contained in:
Franco Fichtner 2016-10-01 10:37:47 +02:00
parent 0c3caa6475
commit 06307f9eb6
3 changed files with 8 additions and 3 deletions

View File

@ -55,6 +55,14 @@ require_once("legacy_bindings.inc");
require_once('upgrade_config.inc');
require_once("certs.inc");
/*
* Hook up the plugin system which consists of several low-profile
* functions that can be called from within our backend code when
* they exist. The magic here is that if the plugin system is not
* required it can be completely disabled by removing plugins.inc.
*/
include_once('plugins.inc');
/* make a global alias table (for faster lookups) */
function alias_make_table($config)
{
@ -178,7 +186,6 @@ function write_config($desc = '', $backup = true)
}
if (function_exists('plugins_interfaces')) {
/* only pull plugins if plugins.inc was included before */
plugins_interfaces();
}

View File

@ -2660,7 +2660,6 @@ function services_get()
);
if (function_exists('plugins_services')) {
/* only pull plugins if plugins.inc was included before */
foreach (plugins_services() as $service) {
$services[] = $service;
}

View File

@ -783,7 +783,6 @@ function system_syslogd_start()
$syslogconfs = array();
if (function_exists('plugins_syslog')) {
/* only pull plugins if plugins.inc was included before */
foreach (plugins_syslog() as $plugin_name => $plugin_details) {
$syslogconfs[$plugin_name] = $plugin_details;
}