Revert "Do not use template shipped by core"
This commit is contained in:
Родитель
190aec2b85
Коммит
4eaa34e0a9
|
@ -533,7 +533,15 @@ class DocumentController extends Controller {
|
|||
], Http::STATUS_BAD_REQUEST);
|
||||
}
|
||||
|
||||
$content = file_get_contents(dirname(dirname(__DIR__)) . self::ODT_TEMPLATE_PATH);
|
||||
$content = '';
|
||||
if (class_exists(TemplateManager::class)){
|
||||
$manager = \OC_Helper::getFileTemplateManager();
|
||||
$content = $manager->getTemplate($mimetype);
|
||||
}
|
||||
|
||||
if (!$content){
|
||||
$content = file_get_contents(dirname(dirname(__DIR__)) . self::ODT_TEMPLATE_PATH);
|
||||
}
|
||||
|
||||
if ($content) {
|
||||
$file->putContent($content);
|
||||
|
|
Загрузка…
Ссылка в новой задаче