Code Duplication    Length = 10-10 lines in 2 locations

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

@@ 6227-6236 (lines=10) @@
6224
 * @param bool $getURL
6225
 * @return string
6226
 */
6227
function api_get_js($file, $getURL = false)
6228
{
6229
    $url = Container::getAsset()->getUrl($file);
6230
6231
    if ($getURL) {
6232
        return $url;
6233
    }
6234
6235
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6236
}
6237
6238
/**
6239
 * Returns the <script> HTML tag
@@ 6245-6254 (lines=10) @@
6242
 * @param bool $getURL only returns the URL without the <script> tag
6243
 * @return string
6244
 */
6245
function api_get_asset($file, $getURL = false)
6246
{
6247
    $url = Container::getAsset()->getUrl("assets/".$file);
6248
6249
    if ($getURL) {
6250
        return $url;
6251
    }
6252
6253
    return '<script type="text/javascript" src="'.$url.'"></script>'."\n";
6254
}
6255
6256
/**
6257
 * Returns the <link> HTML tag