[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.

skala
Ivan Tcholakov 16 years ago
parent f2db56aadf
commit 72558367ac
  1. 12
      main/newscorm/learnpath.class.php

@ -8765,7 +8765,15 @@ EOD;
*/ */
function create_path($path){ function create_path($path){
$path_bits = split('/',dirname($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){ foreach($path_bits as $bit){
if(!empty($bit)){ if(!empty($bit)){
$new_path = $path_built.$bit; $new_path = $path_built.$bit;
@ -8898,4 +8906,4 @@ if (!function_exists('trim_value')) {
} }
} }
?> ?>

Loading…
Cancel
Save