better function name

This commit is contained in:
j 2019-11-29 20:48:40 +01:00
parent 007b9394c7
commit f311062b5a
2 changed files with 3 additions and 3 deletions

View File

@ -66,7 +66,7 @@ pandora.ui.document = function() {
? pandora.user.ui.documents[item.id].position
: 1,
url: '/documents/' + item.id + '/'
+ pandora.safePDFName(item.title + '.' + item.extension),
+ pandora.safeDocumentName(item.title) + '.' + item.extension,
width: that.width(),
zoom: 'fit'
})
@ -80,7 +80,7 @@ pandora.ui.document = function() {
imageHeight: item.dimensions[1],
imagePreviewURL: pandora.getMediaURL('/documents/' + item.id + '/256p.jpg?' + item.modified),
imageURL: pandora.getMediaURL('/documents/' + item.id + '/'
+ pandora.safePDFName(item.title) + '.' + item.extension + '?' + item.modified),
+ pandora.safeDocumentName(item.title) + '.' + item.extension + '?' + item.modified),
imageWidth: item.dimensions[0],
width: that.width()
}).css({

View File

@ -2640,7 +2640,7 @@ pandora.openURL = function(url) {
}
};
pandora.safePDFName = function(name) {
pandora.safeDocumentName = function(name) {
name = name.replace('?', '_').replace('#', '_');
return name;
};