mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
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:
parent
13fe0f5612
commit
e9046a0f24
1 changed files with 0 additions and 18 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue