From e9046a0f24c815ee3a1e88e11c0b24ef569c3235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 11 Mar 2025 11:43:05 +0100 Subject: [PATCH] fix: Remove obsolete component template function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit HTML imports are not a thing anymore, they are not supported by any browser. Signed-off-by: Côme Chilliet --- lib/private/Template/functions.php | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/lib/private/Template/functions.php b/lib/private/Template/functions.php index d9cf5f3f63a..9c7abdb9eb4 100644 --- a/lib/private/Template/functions.php +++ b/lib/private/Template/functions.php @@ -176,24 +176,6 @@ function translation($app): void { OC_Util::addTranslations($app); } -/** - * Shortcut for HTML imports - * @param string $app the appname - * @param string|string[] $file the path relative to the app's component folder, - * if an array is given it will add all components - */ -function component($app, $file): void { - if (is_array($file)) { - foreach ($file as $f) { - $url = link_to($app, 'component/' . $f . '.html'); - OC_Util::addHeader('link', ['rel' => 'import', 'href' => $url]); - } - } else { - $url = link_to($app, 'component/' . $file . '.html'); - OC_Util::addHeader('link', ['rel' => 'import', 'href' => $url]); - } -} - /** * make \OCP\IURLGenerator::linkTo available as a simple function * @param string $app app