Merge pull request #1187 from lemondevxyz/fix-issue-1177

OO disallow " (copy)" from being added to files used with template
This commit is contained in:
wginolas 2023-08-29 10:31:02 +02:00 committed by GitHub
commit 6546db19f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -235,13 +235,14 @@ define([
var getFileType = function () {
var type = common.getMetadataMgr().getPrivateData().ooType;
var priv = common.getMetadataMgr().getPrivateData();
var type = priv.ooType;
var title = common.getMetadataMgr().getMetadataLazy().title;
if (APP.downloadType) {
type = APP.downloadType;
title = "download";
}
if(title === "" && APP.startWithTemplate) {
if(title === "" && APP.startWithTemplate && priv.fromFileData) {
var metadata = APP.startWithTemplate.content.metadata;
var copyTitle = Messages._getKey('copy_title', [metadata.title || metadata.defaultTitle]);
common.getMetadataMgr().updateTitle(copyTitle);