From 2e3af0006ccd1bf520e949de358e818060fd2392 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?= Date: Thu, 26 Jan 2012 19:06:39 +0100 Subject: [PATCH] Bug #4254 fix view myfiles from a course --- main/document/document.php | 3 +++ .../editor/plugins/ajaxfilemanager/inc/config.base.php | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/main/document/document.php b/main/document/document.php index d92214e87d..3ab7a19ce3 100644 --- a/main/document/document.php +++ b/main/document/document.php @@ -210,6 +210,9 @@ switch ($action) { $id_session= Security::remove_XSS($_GET['id_session']); $gidReq= Security::remove_XSS($_GET['gidReq']); $id= Security::remove_XSS($_GET['id']); + if(empty($parent_id)){ + $parent_id=0; + } $file_link = Display::url(get_lang('SeeFile'), api_get_path(WEB_CODE_PATH).'social/myfiles.php?cidReq='.$cidReq.'&id_session='.$id_session.'&gidReq='.$gidReq.'&parent_id='.$parent_id); if (file_exists($copyfile)) { diff --git a/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php b/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php index e81eb34450..0c088f630d 100644 --- a/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php +++ b/main/inc/lib/fckeditor/editor/plugins/ajaxfilemanager/inc/config.base.php @@ -36,7 +36,7 @@ define('CONFIG_SYS_THUMBNAIL_VIEW_ENABLE', true);//REMOVE THE thumbnail view if //User Permissions //Hack by Juan Carlos RaƱa Trabado -if(empty($_course['path'])) { +if(empty($_course['path']) || Security::remove_XSS($_GET['editor'])=="stand_alone") { define('CONFIG_OPTIONS_DELETE', true); define('CONFIG_OPTIONS_CUT', true); define('CONFIG_OPTIONS_COPY', true); @@ -78,7 +78,7 @@ these two paths accept relative path only, don't use absolute path // Integration for Chamilo -if(!empty($_course['path'])) { +if(!empty($_course['path']) && Security::remove_XSS($_GET['editor'])!="stand_alone") { if(!empty($group_properties['directory'])) { $PathChamiloAjaxFileManager='../../../../../../../courses/'.$_course['path'].'/document'.$group_properties['directory'].'/'; } else {