From b4a0e30f4433e365c678dc5b9c9b2bf898849c71 Mon Sep 17 00:00:00 2001 From: jmontoyaa Date: Mon, 19 Dec 2016 12:56:29 +0100 Subject: [PATCH] Add api_get_cidreq() --- main/dropbox/dropbox_download.php | 2 +- main/dropbox/dropbox_functions.inc.php | 6 +++++- main/dropbox/dropbox_init.inc.php | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/main/dropbox/dropbox_download.php b/main/dropbox/dropbox_download.php index 6aa3a6a646..6f2cd875b3 100755 --- a/main/dropbox/dropbox_download.php +++ b/main/dropbox/dropbox_download.php @@ -55,7 +55,7 @@ if (isset($_GET['cat_id']) && $files_to_download[] = $row['id']; } if (!is_array($files_to_download) || empty($files_to_download)) { - header('location: index.php?view='.Security::remove_XSS($_GET['sent_received']).'&error=ErrorNoFilesInFolder'); + header('Location: index.php?'.api_get_cidreq().'&view='.Security::remove_XSS($_GET['sent_received']).'&error=ErrorNoFilesInFolder'); exit; } zip_download($files_to_download); diff --git a/main/dropbox/dropbox_functions.inc.php b/main/dropbox/dropbox_functions.inc.php index 3c5b5ca3d1..0cfd08a2e8 100755 --- a/main/dropbox/dropbox_functions.inc.php +++ b/main/dropbox/dropbox_functions.inc.php @@ -446,7 +446,11 @@ function display_addcategory_form($category_name = '', $id = '', $action) $text = get_lang('CreateCategory'); } - $form = new FormValidator('add_new_category', 'post', api_get_self().'?view='.Security::remove_XSS($_GET['view'])); + $form = new FormValidator( + 'add_new_category', + 'post', + api_get_self().'?'.api_get_cidreq().'&view='.Security::remove_XSS($_GET['view']) + ); $form->addElement('header', $title); if (isset($id) && $id != '') { diff --git a/main/dropbox/dropbox_init.inc.php b/main/dropbox/dropbox_init.inc.php index 391e663553..5b662c4fdb 100755 --- a/main/dropbox/dropbox_init.inc.php +++ b/main/dropbox/dropbox_init.inc.php @@ -292,14 +292,14 @@ if (!$view || $view == 'received') { } elseif ($view = 'sent') { $part = 'sent'; } else { - header('location: index.php?view='.$view.'&error=Error'); + header('location: index.php?'.api_get_cidreq().'&view='.$view.'&error=Error'); exit; } if (($postAction == 'download_received' || $postAction == 'download_sent') and !$_POST['store_feedback']) { $checked_file_ids = $_POST['id']; if (!is_array($checked_file_ids) || count($checked_file_ids) == 0) { - header('location: index.php?view='.$view.'&error=CheckAtLeastOneFile'); + header('Location: index.php?'.api_get_cidreq().'&view='.$view.'&error=CheckAtLeastOneFile'); } else { handle_multiple_actions(); }