Bladeren bron

Feature #2479 fix show size when a file is uploaded, pasted from advanced HTML editor

Juan Carlos Raña 14 jaren geleden
bovenliggende
commit
bdbc1449b9

+ 2 - 2
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_paste.php

@@ -99,10 +99,10 @@
 								{
 									
 									$mainPath= getParentFolderPath($folderInfo['path']);// from ajaxfilemanager sample ../../../../../../../courses/TEST/document/
-									$fullPath=$tem['final_path'];// from ajaxfilemanager sample ../../../../../../../courses/TEST/document/icons/book_highlight.jpg
+									$fullPath=$tem['final_path'];// from ajaxfilemanager sample ../../../../../../../courses/TEST/document/icons/book_highlight.jpg									
 									$chamiloFolder = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1); // sample /icons/book_highlight.jpg or /icons
 									$chamiloFile = $tem['name'];	//get ajaxmanager
-									$chamiloFileSize = $tem['size'];//get ajaxmanager //TODO:change by filesize($tem)?
+									$chamiloFileSize = filesize($fullPath);//get ajaxmanager
 									if(!empty($group_properties['directory'])){
 										$chamiloFolder=$group_properties['directory'].$chamiloFolder;//get Chamilo
 									}

+ 1 - 1
main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/ajax_file_upload.php

@@ -76,7 +76,7 @@
 									$mainPath= getParentFolderPath($folderInfo['path']);//get	ajaxmanager. Sample ../../../../../../../courses/TEST/document/Grupo_1_groupdocs/
 									$chamiloFolder = substr($fullPath, strlen($mainPath)-strlen($fullPath)-1);
 									$chamiloFile = $tem['name'];	//get	ajaxmanager
-									$chamiloFileSize = $tem['size'];//get ajaxmanager
+									$chamiloFileSize = filesize($fullPath); //get ajaxmanager
 									if(!empty($group_properties['directory'])) //get Chamilo
 									{
 										$chamiloFolder=$group_properties['directory'].$chamiloFolder;//get Chamilo