[svn r10591] fix a bug

skala
Eric Marguin 19 years ago
parent c6884c204a
commit f6ddca35f7
  1. 6
      main/inc/lib/fckeditor/editor/filemanager/upload/php/upload.php
  2. 2
      main/inc/lib/fckeditor/editor/plugins/ImageManager/editorFrame.php

@ -76,8 +76,9 @@ $currentCourseRepositoryWeb = api_get_path(WEB_COURSE_PATH) . $_course["path"].
$sType=strtolower($sType); $sType=strtolower($sType);
if(isset($_SESSION["_course"]["sysCode"])){ 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()){ 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"){ if($sType=="mp3"){
$sServerDir = $currentCourseRepositorySys.'document/audio/'; $sServerDir = $currentCourseRepositorySys.'document/audio/';
$sserverWebath=$currentCourseRepositoryWeb.'document/audio/'; $sserverWebath=$currentCourseRepositoryWeb.'document/audio/';
@ -92,11 +93,12 @@ if(isset($_SESSION["_course"]["sysCode"])){
$sserverWebath=$currentCourseRepositoryWeb.'document/'; $sserverWebath=$currentCourseRepositoryWeb.'document/';
} }
} }
//It's a student, we get the upload path in parameters
elseif(isset($_REQUEST['uploadPath']) && $_REQUEST['uploadPath']!=""){ elseif(isset($_REQUEST['uploadPath']) && $_REQUEST['uploadPath']!=""){
$sServerDir = $currentCourseRepositorySys.$_REQUEST['uploadPath']; $sServerDir = $currentCourseRepositorySys.$_REQUEST['uploadPath'];
$sserverWebath=$currentCourseRepositoryWeb.$_REQUEST['uploadPath']; $sserverWebath=$currentCourseRepositoryWeb.$_REQUEST['uploadPath'];
} }
//Default
else{ else{
$sServerDir = $currentCourseRepositorySys.'upload/'; $sServerDir = $currentCourseRepositorySys.'upload/';
$sserverWebath=$currentCourseRepositoryWeb.'upload/'; $sserverWebath=$currentCourseRepositoryWeb.'upload/';

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

Loading…
Cancel
Save