Skip to content
Snippets Groups Projects
Commit b07ef7ef authored by Loraine Gueguen's avatar Loraine Gueguen
Browse files

JBROWSE_LINKS uses ENABLE_JBROWSE as base_url if available

parent afee029a
No related branches found
No related tags found
No related merge requests found
......@@ -119,10 +119,14 @@ if(count($alignments) > 0){ ?>
$cur_org = $feature->organism_id->abbreviation;
$dlist = explode(';', $links);
if (substr(getenv('ENABLE_JBROWSE'), 0, 8) === "https://" OR substr(getenv('ENABLE_JBROWSE'), 0, 7) === "http://")
$base_url = getenv('ENABLE_JBROWSE');
else
$base_url = $GLOBALS['base_url'];
foreach ($dlist as $delem) {
$d = explode('>', $delem);
if ($cur_org === $d[0] || substr($alignment->name, 0, strlen($d[0])) === $d[0]) {
$url = "/jbrowse/?data=data/".$d[1]."&";
$url = $base_url."/jbrowse/?data=data/".$d[1]."&";
$found_link = true;
break;
}
......@@ -131,7 +135,7 @@ if(count($alignments) > 0){ ?>
if (!$found_link) {
if (getenv('ENABLE_JBROWSE') == "1")
$url = '/jbrowse/?';
$url = $GLOBALS['base_url'].'/jbrowse/?';
else {
// Some url was given
$url = getenv('ENABLE_JBROWSE');
......@@ -141,7 +145,7 @@ if(count($alignments) > 0){ ?>
$url .= '?';
}
}
$feature_loc = "<a href='".$GLOBALS['base_url'].$url."loc=".$alignment->name."%3A".($alignment->fmin + 1)."..".$alignment->fmax."'>".$feature_loc."</a>";
$feature_loc = "<a href='".$url."loc=".$alignment->name."%3A".($alignment->fmin + 1)."..".$alignment->fmax."'>".$feature_loc."</a>";
}
if ($alignment->type == 'contig' && getenv('ENABLE_APOLLO')) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment