Skip to content
New issue

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

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

Already on GitHub? # to your account

[publication] Fix download prevention by overriding download notification function #9208

16 changes: 16 additions & 0 deletions modules/publication/php/files.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,20 @@ class Files extends \LORIS\Http\FilesPassthroughEndpoint
{
return "/files/";
}

/**
* Send a notification for the download.
*
* @param string $file The filename being downloaded
*
* @return void
*
* @phan-suppress-next-line PhanUnusedProtectedMethodParameter
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can wait until the tests run to see if it ignores comments but I'm pretty sure "suppress-next-line" needs to go immediately above the line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

* Next line suppressed due to false-positive
* Unused parameter $file required to match parent signature
*/
protected function doDownloadNotification($file)
{
// Not implemented for this module
}
}
Loading