Skip to content

Commit

Permalink
Bug fixes to instance manage tracks page.
Browse files Browse the repository at this point in the history
  • Loading branch information
laceysanderson committed Dec 5, 2019
1 parent acf4903 commit f74597d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions tripal_jbrowse_mgmt/includes/tripal_jbrowse_mgmt.api.inc
Original file line number Diff line number Diff line change
Expand Up @@ -455,12 +455,17 @@ function tripal_jbrowse_mgmt_build_http_query($instance) {
function tripal_jbrowse_mgmt_get_json($instance) {
$path = tripal_jbrowse_mgmt_get_track_list_file_path($instance);

$contents = file_get_contents($path);
if (!$contents) {
throw new Exception('Unable to find ' . $path . ' file');
}
if (file_exists($path)) {
$contents = file_get_contents($path);
if (!$contents) {
throw new Exception('Unable to find ' . $path . ' file');
}

return json_decode($contents, TRUE);
return json_decode($contents, TRUE);
}
else {
return [];
}
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function tripal_jbrowse_mgmt_add_form($form, &$form_state) {
'#type' => 'fieldset',
'#title' => t('Reference Sequence File'),
'#collabsible' => FALSE,
'weight' => 0
'#weight' => 0
];

$form['data']['data_desc'] = [
Expand Down

0 comments on commit f74597d

Please sign in to comment.