Merge pull request #119 from ONLYOFFICE/feature/template-submodule

Feature/template submodule
This commit is contained in:
Sergey Linnik
2021-02-04 18:39:50 +03:00
committed by GitHub
76 changed files with 91 additions and 227 deletions

View File

@ -122,7 +122,7 @@
$dataCompareFile = [
"fileType" => "docx",
"url" => serverPath(true) . "/webeditor-ajax.php?type=download&name=demo.docx"
"url" => serverPath(true) . "/webeditor-ajax.php?type=download&name=sample.docx"
];
$dataMailMergeRecipients = [
@ -138,10 +138,11 @@
}
function tryGetDefaultByType($createExt) {
$demoName = ($_GET["sample"] ? "demo." : "new.") . $createExt;
$demoName = ($_GET["sample"] ? "sample." : "new.") . $createExt;
$demoPath = "assets" . DIRECTORY_SEPARATOR . ($_GET["sample"] ? "sample" : "new") . DIRECTORY_SEPARATOR;
$demoFilename = GetCorrectName($demoName);
if(!@copy(dirname(__FILE__) . DIRECTORY_SEPARATOR . "app_data" . DIRECTORY_SEPARATOR . $demoName, getStoragePath($demoFilename)))
if(!@copy(dirname(__FILE__) . DIRECTORY_SEPARATOR . $demoPath . $demoName, getStoragePath($demoFilename)))
{
sendlog("Copy file error to ". getStoragePath($demoFilename), "common.log");
//Copy error!!!