From a9c089064bd7e723f9118c372c599d11eb8a66f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julius=20H=C3=A4rtl?= <jus@bitgrid.net>
Date: Wed, 16 Oct 2019 09:54:17 +0200
Subject: [PATCH] Deprecate TemplateManager
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Julius Härtl <jus@bitgrid.net>
---
 apps/files/appinfo/app.php                 | 1 -
 core/templates/filetemplates/template.html | 9 ---------
 lib/private/Files/Type/TemplateManager.php | 5 +++++
 lib/private/legacy/helper.php              | 1 +
 4 files changed, 6 insertions(+), 10 deletions(-)
 delete mode 100644 core/templates/filetemplates/template.html

diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index dfff7f6f464..fb03b982815 100644
--- a/apps/files/appinfo/app.php
+++ b/apps/files/appinfo/app.php
@@ -34,7 +34,6 @@ $l = \OC::$server->getL10N('files');
 \OC::$server->getSearch()->registerProvider(File::class, array('apps' => array('files')));
 
 $templateManager = \OC_Helper::getFileTemplateManager();
-$templateManager->registerTemplate('text/html', 'core/templates/filetemplates/template.html');
 $templateManager->registerTemplate('application/vnd.oasis.opendocument.presentation', 'core/templates/filetemplates/template.odp');
 $templateManager->registerTemplate('application/vnd.oasis.opendocument.text', 'core/templates/filetemplates/template.odt');
 $templateManager->registerTemplate('application/vnd.oasis.opendocument.spreadsheet', 'core/templates/filetemplates/template.ods');
diff --git a/core/templates/filetemplates/template.html b/core/templates/filetemplates/template.html
deleted file mode 100644
index f16e80cb7ef..00000000000
--- a/core/templates/filetemplates/template.html
+++ /dev/null
@@ -1,9 +0,0 @@
-<!DOCTYPE html>
-<html>
-	<head>
-
-	</head>
-	<body>
-
-	</body>
-</html>
diff --git a/lib/private/Files/Type/TemplateManager.php b/lib/private/Files/Type/TemplateManager.php
index 8b30eb6b4e8..08c4593bf87 100644
--- a/lib/private/Files/Type/TemplateManager.php
+++ b/lib/private/Files/Type/TemplateManager.php
@@ -24,6 +24,9 @@
 
 namespace OC\Files\Type;
 
+/**
+ * @deprecated 18.0.0
+ */
 class TemplateManager {
 	protected $templates = array();
 
@@ -34,6 +37,7 @@ class TemplateManager {
 	/**
 	 * get the path of the template for a mimetype
 	 *
+	 * @deprecated 18.0.0
 	 * @param string $mimetype
 	 * @return string|null
 	 */
@@ -48,6 +52,7 @@ class TemplateManager {
 	/**
 	 * get the template content for a mimetype
 	 *
+	 * @deprecated 18.0.0
 	 * @param string $mimetype
 	 * @return string
 	 */
diff --git a/lib/private/legacy/helper.php b/lib/private/legacy/helper.php
index a5ed3a3e24b..6faba3ebee2 100644
--- a/lib/private/legacy/helper.php
+++ b/lib/private/legacy/helper.php
@@ -189,6 +189,7 @@ class OC_Helper {
 	}
 
 	/**
+	 * @deprecated 18.0.0
 	 * @return \OC\Files\Type\TemplateManager
 	 */
 	static public function getFileTemplateManager() {
-- 
GitLab