diff options
author | Phil Davis <phil.davis@inf.org> | 2016-06-28 09:01:31 +0930 |
---|---|---|
committer | Phil Davis <phil.davis@inf.org> | 2016-06-28 09:01:31 +0930 |
commit | 86573bb9644f484b974861874f8f50842c31cbc5 (patch) | |
tree | b05d67f1452243970be09c634f8d6a0e763e0fab /src/usr/local/www/shortcuts.inc | |
parent | f310decfbb6beea0955357700469a0c2244468b7 (diff) | |
download | pfsense-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.inc | 4 |
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}"); } } } |