Pārlūkot izejas kodu

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

Ivan Tcholakov 16 gadi atpakaļ
vecāks
revīzija
72558367ac
1 mainītis faili ar 10 papildinājumiem un 2 dzēšanām
  1. 10 2
      main/newscorm/learnpath.class.php

+ 10 - 2
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')) {
     }
 }
 
-?>
+?>