fix: Remove obsolete component template function

HTML imports are not a thing anymore, they are not supported by any
 browser.

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2025-03-11 11:43:05 +01:00 committed by Côme Chilliet
parent 13fe0f5612
commit e9046a0f24

View file

@ -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