From 947e33c390f32543856eb909515c503e3449b263 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Tue, 21 Sep 2010 16:44:41 +0000 Subject: [PATCH] fix to include_dir to work on older versions of php (thanks Mark Loveley of Griffin) git-svn-id: http://www.observium.org/svn/observer/trunk@1714 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/functions.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/includes/functions.php b/includes/functions.php index 96edcf7c6..66adadc7b 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -671,9 +671,13 @@ function isHexString($str) } # Include all .inc.php files in $dir -function include_dir($dir, $regex = "/\.inc\.php$/") +function include_dir($dir, $regex) { global $device, $config; + if ( $regex == "") + { + $regex = "/\.inc\.php$/"; + } if ($handle = opendir($config['install_dir'] . '/' . $dir)) {