Skip to content

Commit

Permalink
[EEG] Electrodes query fix
Browse files Browse the repository at this point in the history
  • Loading branch information
laemtl committed Mar 23, 2023
1 parent 73c9c67 commit 50ce371
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion modules/electrophysiology_browser/php/sessions.class.inc
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,6 @@ class Sessions extends \NDB_Page
// Metadata

$queries = [
'physiological_electrode' => 'physiological_electrode_file',
'physiological_channel' => 'physiological_channel_file',
'physiological_event_archive' => 'physiological_event_files',
'physiological_annotation_archive' => 'physiological_annotation_files',
Expand Down Expand Up @@ -616,6 +615,7 @@ class Sessions extends \NDB_Page
$query_statement,
['PFID' => $physioFileID]
);

if ($query_statement) {
$downloadLinks[$query_value] = [
'file' => $query_statement['FilePath'],
Expand All @@ -629,6 +629,24 @@ class Sessions extends \NDB_Page
}
}

// Electrodes
$file_name = 'physiological_electrode_file';
$query_statement = "SELECT DISTINCT(FilePath)
FROM physiological_electrode
JOIN physiological_coord_system_electrode_rel USING (PhysiologicalElectrodeID)
WHERE PhysiologicalFileID=:PFID";
$query_statement = $db->pselectRow(
$query_statement,
['PFID' => $physioFileID]
);

$downloadLinks[$file_name] = [
'file' => '',
'label' => $labels[$file_name],
];
if ($query_statement) {
$downloadLinks[$file_name]['file'] = $query_statement['FilePath'];
}
return $downloadLinks;
}

Expand Down

0 comments on commit 50ce371

Please sign in to comment.