summaryrefslogtreecommitdiffstats
path: root/src/etc/inc
diff options
context:
space:
mode:
authorChris Buechler <cmb@pfsense.org>2016-06-28 22:01:25 -0500
committerChris Buechler <cmb@pfsense.org>2016-06-28 22:01:25 -0500
commitadcb1d0837d3cb492c88a9ef61d31a7437c43c95 (patch)
treec1c5c917fbb01be6533a1cb5b8416128dd68213c /src/etc/inc
parent5f93d5f1725ac82b7ad3bc2d7c116f78029fbead (diff)
parent86573bb9644f484b974861874f8f50842c31cbc5 (diff)
downloadpfsense-adcb1d0837d3cb492c88a9ef61d31a7437c43c95.zip
pfsense-adcb1d0837d3cb492c88a9ef61d31a7437c43c95.tar.gz
Merge pull request #3024 from phil-davis/include_once
Diffstat (limited to 'src/etc/inc')
-rw-r--r--src/etc/inc/captiveportal.inc2
-rw-r--r--src/etc/inc/globals.inc2
-rw-r--r--src/etc/inc/pfsense-utils.inc2
-rw-r--r--src/etc/inc/priv.inc4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/etc/inc/captiveportal.inc b/src/etc/inc/captiveportal.inc
index dfa9e3c..e2f6a51 100644
--- a/src/etc/inc/captiveportal.inc
+++ b/src/etc/inc/captiveportal.inc
@@ -2289,7 +2289,7 @@ function portal_allow($clientip, $clientmac, $username, $password = null, $attri
$message = 0;
}
- include("{$g['varetc_path']}/captiveportal-{$cpzone}-logout.html");
+ include_once("{$g['varetc_path']}/captiveportal-{$cpzone}-logout.html");
} else {
portal_reply_page($my_redirurl, "redir", "Just redirect the user.");
diff --git a/src/etc/inc/globals.inc b/src/etc/inc/globals.inc
index f47b759..1d5aa28 100644
--- a/src/etc/inc/globals.inc
+++ b/src/etc/inc/globals.inc
@@ -221,7 +221,7 @@ $sysctls = array("net.inet.ip.portrange.first" => "1024",
/* Include override values for the above if needed. If the file doesn't exist, don't try to load it. */
if (file_exists("/etc/inc/globals_override.inc")) {
- @include("globals_override.inc");
+ @include_once("globals_override.inc");
}
/* Read all XML files in following dir and load menu entries */
diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc
index 390c322..cb64aca 100644
--- a/src/etc/inc/pfsense-utils.inc
+++ b/src/etc/inc/pfsense-utils.inc
@@ -2733,7 +2733,7 @@ function pfSense_handle_custom_code($src_dir) {
continue;
}
// Include the extra handler
- include("$nf");
+ include_once("$nf");
}
}
}
diff --git a/src/etc/inc/priv.inc b/src/etc/inc/priv.inc
index 6315f72..b0fcea0 100644
--- a/src/etc/inc/priv.inc
+++ b/src/etc/inc/priv.inc
@@ -88,14 +88,14 @@ function get_priv_files($directory) {
$dir_array = get_priv_files("/etc/inc/priv");
foreach ($dir_array as $file) {
if (!is_dir("/etc/inc/priv/{$file}") && stristr($file, ".inc")) {
- include("/etc/inc/priv/{$file}");
+ include_once("/etc/inc/priv/{$file}");
}
}
if (is_dir("/usr/local/pkg/priv")) {
$dir_array = get_priv_files("/usr/local/pkg/priv");
foreach ($dir_array as $file) {
if (!is_dir("/usr/local/pkg/priv/{$file}") && stristr($file, ".inc")) {
- include("/usr/local/pkg/priv/{$file}");
+ include_once("/usr/local/pkg/priv/{$file}");
}
}
}
OpenPOWER on IntegriCloud