From 2c1617d036aebf270c531ca1f49b46e4abaaa3c1 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Tue, 13 Feb 2018 14:42:25 +0100 Subject: [PATCH] Fix redirect after changing visibility see BT#14006 --- main/document/document.php | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/main/document/document.php b/main/document/document.php index 286dc35363..5c5fa0ffd2 100755 --- a/main/document/document.php +++ b/main/document/document.php @@ -2056,19 +2056,20 @@ $table = new SortableTableFromArrayConfig( 'ASC', true ); -$query_vars = []; +$queryVars = []; if (isset($_GET['keyword'])) { - $query_vars['keyword'] = Security::remove_XSS($_GET['keyword']); + $queryVars['keyword'] = Security::remove_XSS($_GET['keyword']); } else { - $query_vars['curdirpath'] = $curdirpath; + $queryVars['curdirpath'] = $curdirpath; } if ($groupId) { - $query_vars['gidReq'] = $groupId; + $queryVars['gidReq'] = $groupId; } -$query_vars['cidReq'] = api_get_course_id(); -$table->set_additional_parameters($query_vars); - +$queryVars['cidReq'] = api_get_course_id(); +$queryVars['id_session'] = api_get_session_id(); +$queryVars['id'] = $document_id; +$table->set_additional_parameters($queryVars); $column = 0; if (($isAllowedToEdit || $group_member_with_upload_rights) &&