Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connect download all button in filemngr to zip streamer and log. #1475

Merged

Conversation

fightingtexasaggie
Copy link
Member

@fightingtexasaggie fightingtexasaggie commented Dec 1, 2023

hotfix - but we need to discuss "download all" on dataset submission as that is still broke.

Update: it's not an issue on submission because we don't show the button in file mangaer when called from dataset submission. All should be good.

@fightingtexasaggie fightingtexasaggie requested a review from a team December 1, 2023 16:05
@fightingtexasaggie fightingtexasaggie self-assigned this Dec 1, 2023
$dataset = $datasetSubmission->getDataset();
$udi = $dataset->getUdi();
// Only log if this is downloaded from dataland. We don't log review downloads.
if ($request->headers->get('referer') and preg_match("/^.*\/data\/$udi$/", $request->headers->get('referer'))) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make a variable for Referer, it's at least being used twice.

@@ -323,70 +326,35 @@ public function downloadFile(File $file, Datastore $datastore): Response
*
* @return Response
*/
public function downloadZipAllFiles(DatasetSubmission $datasetSubmission): Response
public function downloadZipAllFiles(DatasetSubmission $datasetSubmission, LogActionItemEventDispatcher $logActionItemEventDispatcher, Request $request): Response
Copy link
Member

@mickel1138 mickel1138 Dec 1, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docblock can be fixed up some. Order, remove unneeded (or add) params. @route should be last.
Also there are no thrown exceptions.

fightingtexasaggie and others added 2 commits December 1, 2023 15:58
Fixed download all button in file manager
So it would show
mickel1138
mickel1138 previously approved these changes Dec 1, 2023
Copy link
Member

@mickel1138 mickel1138 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, and ready for release.

mickel1138
mickel1138 previously approved these changes Dec 1, 2023
@mickel1138 mickel1138 merged commit 0bfed93 into main Dec 1, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants