Explorar el Código

[svn r10591] fix a bug

Eric Marguin hace 18 años
padre
commit
f6ddca35f7

+ 4 - 2
main/inc/lib/fckeditor/editor/filemanager/upload/php/upload.php

@@ -76,8 +76,9 @@ $currentCourseRepositoryWeb =  api_get_path(WEB_COURSE_PATH) . $_course["path"].
 $sType=strtolower($sType);
 
 if(isset($_SESSION["_course"]["sysCode"])){
+	//It's a teacher, so the uoploaded document will be put in course documents
 	if(api_is_allowed_to_edit()){
-		//En fonction du type, mettre dans audio, flash ou images
+		//set the upload path according to the file type
 		if($sType=="mp3"){
 			$sServerDir = $currentCourseRepositorySys.'document/audio/';
 			$sserverWebath=$currentCourseRepositoryWeb.'document/audio/';
@@ -92,11 +93,12 @@ if(isset($_SESSION["_course"]["sysCode"])){
 			$sserverWebath=$currentCourseRepositoryWeb.'document/';
 		}
 	}
+	//It's a student, we get the upload path in parameters 
 	elseif(isset($_REQUEST['uploadPath']) && $_REQUEST['uploadPath']!=""){
 		$sServerDir = $currentCourseRepositorySys.$_REQUEST['uploadPath'];
 		$sserverWebath=$currentCourseRepositoryWeb.$_REQUEST['uploadPath'];
 	}
-	
+	//Default
 	else{
 		$sServerDir = $currentCourseRepositorySys.'upload/';
 		$sserverWebath=$currentCourseRepositoryWeb.'upload/';

+ 1 - 1
main/inc/lib/fckeditor/editor/plugins/ImageManager/editorFrame.php

@@ -285,7 +285,7 @@
 		if ($_GET['action'] == "watermark")
 		{?>
 				dd.elements.floater.show();
-		<?php}
+		<?php }
 	}
 ?>
 	}