diff --git a/main/document/create_paint.php b/main/document/create_paint.php index dea8647ad6..5bab23c664 100644 --- a/main/document/create_paint.php +++ b/main/document/create_paint.php @@ -41,7 +41,7 @@ $dir = $document_data['path']; $is_allowed_to_edit = api_is_allowed_to_edit(null, true); //path for pixlr save -$_SESSION['paint_dir']=Security::remove_XSS($_GET['dir']); +$_SESSION['paint_dir']=Security::remove_XSS($dir); if ($_SESSION['paint_dir']=='/'){ $_SESSION['paint_dir']=''; } @@ -85,14 +85,14 @@ if (isset ($_SESSION['_gid']) && $_SESSION['_gid'] != 0) { } } -$interbreadcrumb[] = array ("url" => "./document.php?curdirpath=".urlencode($_GET['dir']).$req_gid, "name" => get_lang('Documents')); +$interbreadcrumb[] = array ("url" => "./document.php?curdirpath=".urlencode($dir).$req_gid, "name" => get_lang('Documents')); if (!$is_allowed_in_course) { api_not_allowed(true); } -if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] || is_my_shared_folder($_user['user_id'], Security::remove_XSS($_GET['dir']),api_get_session_id()))) { +if (!($is_allowed_to_edit || $_SESSION['group_member_with_upload_rights'] || is_my_shared_folder($_user['user_id'], Security::remove_XSS($dir),api_get_session_id()))) { api_not_allowed(true); } @@ -142,19 +142,11 @@ $langpixlr = isset($pixlr_code_translation_table[$langpixlr]) ? $pixlredit_code_ $loc=$langpixlr;// deprecated ?? TODO:check pixlr read user browser $exit_path=api_get_path(WEB_CODE_PATH).'document/exit_pixlr.php'; -$_SESSION['exit_pixlr']= Security::remove_XSS($_GET['dir']); -$exit=$exit_path; - +$_SESSION['exit_pixlr']= Security::remove_XSS($dir); $referrer="Chamilo"; - $target_path=api_get_path(WEB_CODE_PATH).'document/save_pixlr.php'; $target=$target_path; - $locktarget="true"; $locktitle="false"; - - -echo ''; - -?> \ No newline at end of file +echo ''; \ No newline at end of file diff --git a/main/document/save_pixlr.php b/main/document/save_pixlr.php index f5261122f8..4957c0c9bb 100644 --- a/main/document/save_pixlr.php +++ b/main/document/save_pixlr.php @@ -6,7 +6,7 @@ * * @package chamilo.document * - * @author Juan Carlos Raña Trabado + * @author Juan Carlos Ra�a Trabado * @since 30/january/2011 */ @@ -131,7 +131,7 @@ unset($_SESSION['paint_file']); unset($_SESSION['whereami']); unset($_SESSION['temp_realpath_image']); -if (!isset($_SESSION['exit_pixlr'])){ +if (!isset($_SESSION['exit_pixlr'])) { $location=api_get_path(WEB_CODE_PATH).'document/document.php'; echo ''; api_not_allowed(true); @@ -141,6 +141,4 @@ else{ $location=api_get_path(WEB_CODE_PATH).'document/document.php?curdirpath='.Security::remove_XSS($_SESSION['exit_pixlr']); echo ''; unset($_SESSION['exit_pixlr']); -} - -?> \ No newline at end of file +} \ No newline at end of file