Code Duplication    Length = 10-10 lines in 2 locations

main/inc/lib/api.lib.php 2 locations

@@ 6380-6389 (lines=10) @@
6377
 * @param bool $getURL
6378
 * @return string
6379
 */
6380
function api_get_js($file, $getURL = false)
6381
{
6382
    $url = Container::getAsset()->getUrl($file);
6383
6384
    if ($getURL) {
6385
        return $url;
6386
    }
6387
6388
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6389
}
6390
6391
/**
6392
 * Returns the <script> HTML tag
@@ 6398-6407 (lines=10) @@
6395
 * @param bool $getURL only returns the URL without the <script> tag
6396
 * @return string
6397
 */
6398
function api_get_asset($file, $getURL = false)
6399
{
6400
    $url = Container::getAsset()->getUrl("assets/".$file);
6401
6402
    if ($getURL) {
6403
        return $url;
6404
    }
6405
6406
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6407
}
6408
6409
/**
6410
 * Returns the <link> HTML tag