Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 6339-6348 (lines=10) @@
6336
 * @param bool $getURL
6337
 * @return string
6338
 */
6339
function api_get_js($file, $getURL = false)
6340
{
6341
    $url = Container::getAsset()->getUrl($file);
6342
6343
    if ($getURL) {
6344
        return $url;
6345
    }
6346
6347
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6348
}
6349
6350
/**
6351
 * Returns the <script> HTML tag
@@ 6357-6366 (lines=10) @@
6354
 * @param bool $getURL only returns the URL without the <script> tag
6355
 * @return string
6356
 */
6357
function api_get_asset($file, $getURL = false)
6358
{
6359
    $url = Container::getAsset()->getUrl("assets/".$file);
6360
6361
    if ($getURL) {
6362
        return $url;
6363
    }
6364
6365
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6366
}
6367
6368
/**
6369
 * Returns the <link> HTML tag