From 72558367ac9dbf8050ba1b8f901836da8a19bca5 Mon Sep 17 00:00:00 2001 From: Ivan Tcholakov Date: Tue, 31 Mar 2009 00:13:16 +0200 Subject: [PATCH] [svn r19431] FS#3938 - Fixing a bug in the methiod create_path($path), learnpath.class.php . The bug prevented SCORM export to be done properly on Windows platforms, the documents were not included within the produced zip-archives. --- main/newscorm/learnpath.class.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/main/newscorm/learnpath.class.php b/main/newscorm/learnpath.class.php index 23fdf04426..e787e0fc67 100644 --- a/main/newscorm/learnpath.class.php +++ b/main/newscorm/learnpath.class.php @@ -8765,7 +8765,15 @@ EOD; */ function create_path($path){ $path_bits = split('/',dirname($path)); - $path_built = '/'; + + if (strpos($path, ':') === false) { + // This should be added only when the platform is non-Windows. + $path_built = '/'; + } else { + // This is for Windows platforms. + $path_built = ''; + } + foreach($path_bits as $bit){ if(!empty($bit)){ $new_path = $path_built.$bit; @@ -8898,4 +8906,4 @@ if (!function_exists('trim_value')) { } } -?> \ No newline at end of file +?>