From 29caac489755630e7ffc345774d091ae36434eb3 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 4 Jun 2008 14:25:10 +0000 Subject: Fixed the callpath_gatekeeper on Windows machines. git-svn-id: https://code.elgg.org/elgg/trunk@795 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/lib/elgglib.php | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'engine') diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php index 9fb8b35c4..ba122b2ec 100644 --- a/engine/lib/elgglib.php +++ b/engine/lib/elgglib.php @@ -1065,12 +1065,15 @@ $callstack = debug_backtrace(); foreach ($callstack as $call) - { + { + $call['file'] = str_replace("\\","/",$call['file']); + if ($include_subdirs) { if (strpos($call['file'], $path) === 0) { - if ($strict_mode) { + if ($strict_mode) { + $callstack[1]['file'] = str_replace("\\","/",$callstack[1]['file']); if ($callstack[1] === $call) { return true; } } else @@ -1081,14 +1084,16 @@ } else { - if (strcmp($path, $call['file'])==0) + if (strcmp($path, $call['file'])==0) { if ($strict_mode) { if ($callstack[1] === $call) return true; } else - return true; + return true; + } } - } + } + return false; } if ($CONFIG->debug) -- cgit v1.2.3