Selecting files inside search results produces wrong download link #11949
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
regarding Issues #1274 and #2075
The method isAllSelected() in filelist.js returns true and in consequence a download link for the whole folder is built:
https://test-nc.example.org/index.php/apps/files/ajax/download.php?dir=/Pics/Wallpaper&files=Parrot&downloadStartSecret=xxxxxxxxx
Selecting files outside search results produces a correct download link:
https://test-nc.example.org/index.php/apps/files/ajax/download.php?dir=/Pics/Wallpaper/Parrot&files=["blade.jpg","blocks.jpg"]&downloadStartSecret=xxxxxxxxx
(both link are not URL-encoded due to better representing)
Removing the if-condition enables download from the search results via "select all" checkbox.
As a side effect, the list of files now is also transferred via GET parameter when explicitly downloading a entire directory. Mayby someone should look at it again.
Signed-off-by: js94x jan@js94x.de