diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2010-05-21 22:20:44 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2010-05-21 22:20:44 -0400 |
commit | 38080cc14c677802493b3a7670498dca8a5e851f (patch) | |
tree | 5d7be138b5631faa9800580923b199b709cfebfa /etc/inc | |
parent | 7a7e94a7be45209c9043678e292e7b7873d0a5a4 (diff) | |
download | pfsense-38080cc14c677802493b3a7670498dca8a5e851f.zip pfsense-38080cc14c677802493b3a7670498dca8a5e851f.tar.gz |
Move get_include_contents function to pfsense-utils.inc
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/pfsense-utils.inc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc index 703d421..0b8317a 100644 --- a/etc/inc/pfsense-utils.inc +++ b/etc/inc/pfsense-utils.inc @@ -2039,4 +2039,16 @@ function nanobsd_detect_slice_info() { $COMPLETE_BOOT_PATH="{$BOOT_DRIVE}s{$OLDSLICE}"; $BOOTFLASH="{$BOOT_DRIVE}s{$OLDSLICE}"; } -?> + +function get_include_contents($filename) { + if (is_file($filename)) { + ob_start(); + include $filename; + $contents = ob_get_contents(); + ob_end_clean(); + return $contents; + } + return false; +} + +?>
\ No newline at end of file |