diff --git a/lib/foldermanagement/compressionArchiveUtil.inc.php b/lib/foldermanagement/compressionArchiveUtil.inc.php index 4dbba01..a4047b6 100644 --- a/lib/foldermanagement/compressionArchiveUtil.inc.php +++ b/lib/foldermanagement/compressionArchiveUtil.inc.php @@ -289,7 +289,7 @@ class ZipFolder { if (!file_exists($sZipFile)) { return PEAR::raiseError(_kt('The zip file has not been created, if you are downloading a large number of documents - or a large document then it may take a few seconds to finish. Try refreshing the page.')); + or a large document then it may take a few minutes to finish.')); } $mimeType = 'application/zip; charset=utf-8;'; diff --git a/plugins/ktcore/KTBulkActions.php b/plugins/ktcore/KTBulkActions.php index 2a04c5b..ea6e902 100644 --- a/plugins/ktcore/KTBulkActions.php +++ b/plugins/ktcore/KTBulkActions.php @@ -1081,7 +1081,10 @@ class KTBrowseBulkExportAction extends KTBulkAction { $this->sExportCode = KTUtil::randomString(); $_SESSION['exportcode'] = $this->sExportCode; + // Save the return url in session so it is not lost when doing the download $folderurl = $this->getReturnUrl(); + $_SESSION['export_return_url'] = $folderurl; + $sReturn = sprintf('

' . _kt('Return to the original folder') . "

\n", $folderurl); $download_url = KTUtil::addQueryStringSelf("action=downloadZipFile&fFolderId={$this->oFolder->getId()}&exportcode={$this->sExportCode}"); @@ -1194,7 +1197,8 @@ class KTBrowseBulkExportAction extends KTBulkAction { if(PEAR::isError($res)){ $this->addErrorMessage($res->getMessage()); - $redirectUrl = $this->getReturnUrl(); + $redirectUrl = $_SESSION['export_return_url']; + unset($_SESSION['export_return_url']); redirect($redirectUrl); } exit(0);