Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 6213-6222 (lines=10) @@
6210
 * @param bool $getURL
6211
 * @return string
6212
 */
6213
function api_get_js($file, $getURL = false)
6214
{
6215
    $url = Container::getAsset()->getUrl($file);
6216
6217
    if ($getURL) {
6218
        return $url;
6219
    }
6220
6221
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6222
}
6223
6224
/**
6225
 * Returns the <script> HTML tag
@@ 6231-6240 (lines=10) @@
6228
 * @param bool $getURL only returns the URL without the <script> tag
6229
 * @return string
6230
 */
6231
function api_get_asset($file, $getURL = false)
6232
{
6233
    $url = Container::getAsset()->getUrl("assets/".$file);
6234
6235
    if ($getURL) {
6236
        return $url;
6237
    }
6238
6239
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6240
}
6241
6242
/**
6243
 * Returns the <link> HTML tag