Skip to content

Commit

Permalink
Merge pull request #4269 from nextcloud/fix/percent-in-file-name
Browse files Browse the repository at this point in the history
fix: remove deprecated `title` parameter
  • Loading branch information
juliusknorr authored Nov 26, 2024
2 parents 108a1cc + 5935550 commit cae21db
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/helpers/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const getWopiSrc = (fileId) => {
return wopiurl
}

const getWopiUrl = ({ fileId, title, readOnly, closeButton, revisionHistory, target = undefined, startPresentation = false }) => {
const getWopiUrl = ({ fileId, readOnly, closeButton, revisionHistory, target = undefined, startPresentation = false }) => {
// Only set the revision history parameter if the versions app is enabled
revisionHistory = revisionHistory && window?.oc_appswebroots?.files_versions

Expand All @@ -39,7 +39,6 @@ const getWopiUrl = ({ fileId, title, readOnly, closeButton, revisionHistory, tar
// https://<loolwsd-server>:9980/hosting/discovery
return Config.get('urlsrc')
+ 'WOPISrc=' + encodeURIComponent(getWopiSrc(fileId))
+ '&title=' + encodeURIComponent(title)
+ '&lang=' + languageToBCP47()
+ (closeButton ? '&closebutton=1' : '')
+ (revisionHistory ? '&revisionhistory=1' : '')
Expand Down
3 changes: 3 additions & 0 deletions src/view/FilesAppIntegration.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,9 @@ export default {
},

/**
* @param mimeTypeFilter
* @param insertFileProc
* @param insertHandler
* @private
*/
insertFile_impl(mimeTypeFilter, insertFileProc, insertHandler) {
Expand Down
1 change: 0 additions & 1 deletion src/view/Office.vue
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,6 @@ export default {
// Generate form and submit to the iframe
const action = getWopiUrl({
fileId: fileid + '_' + loadState('richdocuments', 'instanceId', 'instanceid') + (version > 0 ? '_' + version : ''),
title: this.filename,
readOnly: forceReadOnly || version > 0,
revisionHistory: !this.isPublic,
closeButton: !Config.get('hideCloseButton') && !this.isEmbedded,
Expand Down

0 comments on commit cae21db

Please sign in to comment.