Code Duplication    Length = 10-10 lines in 2 locations

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

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