Commit 3ea36d9e8bfbbc3c734412142a8cb75e3f720951
1 parent
2d3419ca
KTS-3917 The return url was being lost, it is now saved in the session.
"Bulk "Download All" feature does not works" Fixed. Committed by: Megan Watson Reviewed by: Kevin Cyster
Showing
2 changed files
with
6 additions
and
2 deletions
lib/foldermanagement/compressionArchiveUtil.inc.php
| ... | ... | @@ -289,7 +289,7 @@ class ZipFolder { |
| 289 | 289 | |
| 290 | 290 | if (!file_exists($sZipFile)) { |
| 291 | 291 | return PEAR::raiseError(_kt('The zip file has not been created, if you are downloading a large number of documents |
| 292 | - or a large document then it may take a few seconds to finish. Try refreshing the page.')); | |
| 292 | + or a large document then it may take a few minutes to finish.')); | |
| 293 | 293 | } |
| 294 | 294 | |
| 295 | 295 | $mimeType = 'application/zip; charset=utf-8;'; | ... | ... |
plugins/ktcore/KTBulkActions.php
| ... | ... | @@ -1081,7 +1081,10 @@ class KTBrowseBulkExportAction extends KTBulkAction { |
| 1081 | 1081 | $this->sExportCode = KTUtil::randomString(); |
| 1082 | 1082 | $_SESSION['exportcode'] = $this->sExportCode; |
| 1083 | 1083 | |
| 1084 | + // Save the return url in session so it is not lost when doing the download | |
| 1084 | 1085 | $folderurl = $this->getReturnUrl(); |
| 1086 | + $_SESSION['export_return_url'] = $folderurl; | |
| 1087 | + | |
| 1085 | 1088 | $sReturn = sprintf('<p>' . _kt('Return to the original <a href="%s">folder</a>') . "</p>\n", $folderurl); |
| 1086 | 1089 | $download_url = KTUtil::addQueryStringSelf("action=downloadZipFile&fFolderId={$this->oFolder->getId()}&exportcode={$this->sExportCode}"); |
| 1087 | 1090 | |
| ... | ... | @@ -1194,7 +1197,8 @@ class KTBrowseBulkExportAction extends KTBulkAction { |
| 1194 | 1197 | |
| 1195 | 1198 | if(PEAR::isError($res)){ |
| 1196 | 1199 | $this->addErrorMessage($res->getMessage()); |
| 1197 | - $redirectUrl = $this->getReturnUrl(); | |
| 1200 | + $redirectUrl = $_SESSION['export_return_url']; | |
| 1201 | + unset($_SESSION['export_return_url']); | |
| 1198 | 1202 | redirect($redirectUrl); |
| 1199 | 1203 | } |
| 1200 | 1204 | exit(0); | ... | ... |