summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/shortcuts.inc
diff options
context:
space:
mode:
authorPhil Davis <phil.davis@inf.org>2016-06-28 09:01:31 +0930
committerPhil Davis <phil.davis@inf.org>2016-06-28 09:01:31 +0930
commit86573bb9644f484b974861874f8f50842c31cbc5 (patch)
treeb05d67f1452243970be09c634f8d6a0e763e0fab /src/usr/local/www/shortcuts.inc
parentf310decfbb6beea0955357700469a0c2244468b7 (diff)
downloadpfsense-86573bb9644f484b974861874f8f50842c31cbc5.zip
pfsense-86573bb9644f484b974861874f8f50842c31cbc5.tar.gz
Update include() to include_once()
For safety, use include_once() when including various "side" files. There are a couple of instances of include("guiconfig,inc") that I changes to use require_once() to be consistent with everywhere else. The remaining cases of include() are just (hundreds of) head.inc and footer.inc - those are only at the start/end of the ordinary top-level interactive PHP files. There is no nested interaction of those to think about, so that should be fine.
Diffstat (limited to 'src/usr/local/www/shortcuts.inc')
-rw-r--r--src/usr/local/www/shortcuts.inc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/usr/local/www/shortcuts.inc b/src/usr/local/www/shortcuts.inc
index a172616..db21e69 100644
--- a/src/usr/local/www/shortcuts.inc
+++ b/src/usr/local/www/shortcuts.inc
@@ -168,14 +168,14 @@ function get_shortcut_log_link($shortcut_section, $addspace = true) {
$dir_array = get_shortcut_files("/usr/local/www/shortcuts");
foreach ($dir_array as $file) {
if (!is_dir("/usr/local/www/shortcuts/{$file}") && stristr($file, ".inc")) {
- include("/usr/local/www/shortcuts/{$file}");
+ include_once("/usr/local/www/shortcuts/{$file}");
}
}
if (is_dir("/usr/local/pkg/shortcuts")) {
$dir_array = get_shortcut_files("/usr/local/pkg/shortcuts");
foreach ($dir_array as $file) {
if (!is_dir("/usr/local/pkg/shortcuts/{$file}") && stristr($file, ".inc")) {
- include("/usr/local/pkg/shortcuts/{$file}");
+ include_once("/usr/local/pkg/shortcuts/{$file}");
}
}
}
OpenPOWER on IntegriCloud