File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 219
219
220
220
$ data = [];
221
221
$ fileUpload = $ _FILES ['upload ' ];
222
- $ currentDirectory = Security::remove_XSS ($ _REQUEST ['curdirpath ' ]);
223
222
$ isAllowedToEdit = api_is_allowed_to_edit (null , true );
224
223
if ($ isAllowedToEdit ) {
225
224
$ globalFile = ['files ' => $ fileUpload ];
226
225
$ result = DocumentManager::upload_document (
227
226
$ globalFile ,
228
- $ currentDirectory ,
227
+ ' / ' ,
229
228
'' ,
230
229
'' ,
231
230
0 ,
244
243
}
245
244
} else {
246
245
$ userId = api_get_user_id ();
247
- $ syspath = UserManager::getUserPathById ($ userId , 'system ' ).'my_files ' . $ currentDirectory ;
246
+ $ syspath = UserManager::getUserPathById ($ userId , 'system ' ).'my_files ' ;
248
247
if (!is_dir ($ syspath )) {
249
248
mkdir ($ syspath , api_get_permissions_for_new_directories (), true );
250
249
}
251
- $ webpath = UserManager::getUserPathById ($ userId , 'web ' ).'my_files ' . $ currentDirectory ;
250
+ $ webpath = UserManager::getUserPathById ($ userId , 'web ' ).'my_files ' ;
252
251
$ fileUploadName = $ fileUpload ['name ' ];
253
252
if (file_exists ($ syspath .$ fileUploadName )) {
254
253
$ extension = pathinfo ($ fileUploadName , PATHINFO_EXTENSION );
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ public function getConfig()
183
183
$ config ['flash_flvPlayer ' ] = api_get_path (WEB_LIBRARY_JS_PATH ).'ckeditor/plugins/flash/swf/player.swf ' ;
184
184
185
185
if (api_get_configuration_value ('enable_uploadimage_editor ' )) {
186
- $ config ['imageUploadUrl ' ] = api_get_path (WEB_AJAX_PATH ).'document.ajax.php? ' .api_get_cidreq ().'&a=ck_uploadimage&curdirpath=/ ' ;
186
+ $ config ['imageUploadUrl ' ] = api_get_path (WEB_AJAX_PATH ).'document.ajax.php? ' .api_get_cidreq ().'&a=ck_uploadimage ' ;
187
187
}
188
188
/*filebrowserFlashBrowseUrl
189
189
filebrowserFlashUploadUrl
You can’t perform that action at this time.
0 commit comments