Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 6285-6294 (lines=10) @@
6282
 * @param bool $getURL
6283
 * @return string
6284
 */
6285
function api_get_js($file, $getURL = false)
6286
{
6287
    $url = Container::getAsset()->getUrl($file);
6288
6289
    if ($getURL) {
6290
        return $url;
6291
    }
6292
6293
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6294
}
6295
6296
/**
6297
 * Returns the <script> HTML tag
@@ 6303-6312 (lines=10) @@
6300
 * @param bool $getURL only returns the URL without the <script> tag
6301
 * @return string
6302
 */
6303
function api_get_asset($file, $getURL = false)
6304
{
6305
    $url = Container::getAsset()->getUrl("assets/".$file);
6306
6307
    if ($getURL) {
6308
        return $url;
6309
    }
6310
6311
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6312
}
6313
6314
/**
6315
 * Returns the <link> HTML tag