Commit e663978a authored by Ivo Fokkema's avatar Ivo Fokkema

Use a setting for determining who gets to see non-public data, instead of...

Use a setting for determining who gets to see non-public data, instead of having LEVEL_COLLABORATOR defined everywhere in many different places.
parent f8ef131b
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2011-02-17
* Modified : 2019-08-28
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -321,10 +321,11 @@ class LOVD_Custom extends LOVD_Object {
{
// Gathers the columns which are active for the current data type and returns them in a viewEntry format
// Note: object_custom_viewlists.php implements their own version of this code.
global $_AUTH;
global $_AUTH, $_SETT;
$aViewEntry = array();
foreach ($this->aColumns as $sID => $aCol) {
if (!$aCol['public_view'] && $_AUTH['level'] < LEVEL_COLLABORATOR) {
if (!$aCol['public_view'] && $_AUTH['level'] < $_SETT['user_level_settings']['see_nonpublic_data']) {
continue;
}
$aViewEntry[$sID] = $aCol['head_column'];
......@@ -340,13 +341,13 @@ class LOVD_Custom extends LOVD_Object {
{
// Gathers the columns which are active for the current data type and returns them in a viewList format
// Note: object_custom_viewlists.php implements their own version of this code.
global $_AUTH;
global $_AUTH, $_SETT;
$aViewList = array();
foreach ($this->aColumns as $sID => $aCol) {
// In LOVD_plus, the public_view field is used to set if a custom column will be displayed in a VL or not.
// So, in LOVD_plus we need to check for ALL USERS if a custom column has public_view flag turned on or not.
if (!$aCol['public_view'] && (LOVD_plus? true : $_AUTH['level'] < LEVEL_COLLABORATOR)) {
if (!$aCol['public_view'] && (LOVD_plus? true : $_AUTH['level'] < $_SETT['user_level_settings']['see_nonpublic_data'])) {
continue;
}
$bAlignRight = preg_match('/^(DEC|FLOAT|(TINY|SMALL|MEDIUM|BIG)?INT)/', $aCol['mysql_type']);
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2011-08-15
* Modified : 2019-08-28
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -79,13 +79,13 @@ class LOVD_CustomViewList extends LOVD_Object {
// Note: objects inheriting LOVD_custom implement selection of
// viewable columns in buildViewList().
$sSQL = 'SELECT c.id, c.width, c.head_column, c.description_legend_short, c.description_legend_full, c.mysql_type, c.form_type, c.select_options, c.col_order, GROUP_CONCAT(sc.geneid, ":", sc.public_view SEPARATOR ";") AS public_view FROM ' . TABLE_ACTIVE_COLS . ' AS ac INNER JOIN ' . TABLE_COLS . ' AS c ON (c.id = ac.colid) LEFT OUTER JOIN ' . TABLE_SHARED_COLS . ' AS sc ON (sc.colid = ac.colid) ' .
'WHERE ' . ($_AUTH['level'] >= ($sGene? LEVEL_COLLABORATOR : LEVEL_MANAGER)? '' : '((c.id NOT LIKE "VariantOnTranscript/%" AND c.public_view = 1) OR sc.public_view = 1) AND ') . '(c.id LIKE ?' . str_repeat(' OR c.id LIKE ?', count($aObjects)-1) . ') ' .
'WHERE ' . ($_AUTH['level'] >= ($sGene? $_SETT['user_level_settings']['see_nonpublic_data'] : LEVEL_MANAGER)? '' : '((c.id NOT LIKE "VariantOnTranscript/%" AND c.public_view = 1) OR sc.public_view = 1) AND ') . '(c.id LIKE ?' . str_repeat(' OR c.id LIKE ?', count($aObjects)-1) . ') ' .
(!$sGene? 'GROUP BY c.id ' :
// If gene is given, only shown VOT columns active in the given gene! We'll use an UNION for that, so that we'll get the correct width and order also.
'AND c.id NOT LIKE "VariantOnTranscript/%" GROUP BY c.id ' . // Exclude the VOT columns from the normal set, we'll load them below.
'UNION ' .
'SELECT c.id, sc.width, c.head_column, c.description_legend_short, c.description_legend_full, c.mysql_type, c.form_type, c.select_options, sc.col_order, CONCAT(sc.geneid, ":", sc.public_view) AS public_view FROM ' . TABLE_COLS . ' AS c INNER JOIN ' . TABLE_SHARED_COLS . ' AS sc ON (c.id = sc.colid) WHERE sc.geneid = ? ' .
($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'AND sc.public_view = 1 ')) .
($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' : 'AND sc.public_view = 1 ')) .
'ORDER BY col_order';
if (LOVD_plus) {
// In LOVD_plus, the shared cols table is empty and the public_view field is used to set if a custom column will be displayed in a VL or not.
......@@ -750,7 +750,7 @@ class LOVD_CustomViewList extends LOVD_Object {
if (in_array('Individual', $aObjects)) {
unset($this->aColumnsViewList['owned_by_']);
}
if ($_AUTH['level'] < LEVEL_COLLABORATOR) {
if ($_AUTH['level'] < $_SETT['user_level_settings']['see_nonpublic_data']) {
// Unset status column for non-collaborators. We're assuming here, that lovd_isAuthorized() only gets called for gene-specific overviews.
unset($this->aColumnsViewList['var_status']);
}
......@@ -773,7 +773,7 @@ class LOVD_CustomViewList extends LOVD_Object {
'view' => array('Ind. status', 70),
'db' => array('dsi.name', false, true)),
));
if ($_AUTH['level'] < LEVEL_COLLABORATOR) {
if ($_AUTH['level'] < $_SETT['user_level_settings']['see_nonpublic_data']) {
// Unset status column for non-collaborators. We're assuming here, that lovd_isAuthorized() only gets called for gene-specific overviews.
unset($this->aColumnsViewList['ind_status']);
}
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2010-07-28
* Modified : 2019-09-05
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -159,8 +159,8 @@ class LOVD_Disease extends LOVD_Object {
// SQL code for viewing an entry.
$this->aSQLViewEntry['SELECT'] = 'd.*, ' .
'(SELECT COUNT(*) FROM ' . TABLE_INDIVIDUALS . ' AS i INNER JOIN ' . TABLE_IND2DIS . ' AS i2d ON (i.id = i2d.individualid) WHERE i2d.diseaseid = d.id' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : ' AND i.statusid >= ' . STATUS_MARKED) . ') AS individuals, ' .
'(SELECT COUNT(*) FROM ' . TABLE_PHENOTYPES . ' AS p WHERE p.diseaseid = d.id' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : ' AND p.statusid >= ' . STATUS_MARKED) . ') AS phenotypes, ' .
'(SELECT COUNT(*) FROM ' . TABLE_INDIVIDUALS . ' AS i INNER JOIN ' . TABLE_IND2DIS . ' AS i2d ON (i.id = i2d.individualid) WHERE i2d.diseaseid = d.id' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' : ' AND i.statusid >= ' . STATUS_MARKED) . ') AS individuals, ' .
'(SELECT COUNT(*) FROM ' . TABLE_PHENOTYPES . ' AS p WHERE p.diseaseid = d.id' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' : ' AND p.statusid >= ' . STATUS_MARKED) . ') AS phenotypes, ' .
'GROUP_CONCAT(DISTINCT g2d.geneid ORDER BY g2d.geneid SEPARATOR ";") AS _genes, ' .
'uc.name AS created_by_, ' .
'ue.name AS edited_by_';
......@@ -172,8 +172,8 @@ class LOVD_Disease extends LOVD_Object {
// SQL code for viewing a list of entries.
$this->aSQLViewList['SELECT'] = 'd.*, d.id AS diseaseid, ' .
'(SELECT COUNT(DISTINCT i.id) FROM ' . TABLE_IND2DIS . ' AS i2d LEFT OUTER JOIN ' . TABLE_INDIVIDUALS . ' AS i ON (i2d.individualid = i.id' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : ' AND i.statusid >= ' . STATUS_MARKED) . ') WHERE i2d.diseaseid = d.id) AS individuals, ' .
'(SELECT COUNT(*) FROM ' . TABLE_PHENOTYPES . ' AS p WHERE p.diseaseid = d.id' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : ' AND p.statusid >= ' . STATUS_MARKED) . ') AS phenotypes, ' .
'(SELECT COUNT(DISTINCT i.id) FROM ' . TABLE_IND2DIS . ' AS i2d LEFT OUTER JOIN ' . TABLE_INDIVIDUALS . ' AS i ON (i2d.individualid = i.id' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' : ' AND i.statusid >= ' . STATUS_MARKED) . ') WHERE i2d.diseaseid = d.id) AS individuals, ' .
'(SELECT COUNT(*) FROM ' . TABLE_PHENOTYPES . ' AS p WHERE p.diseaseid = d.id' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' : ' AND p.statusid >= ' . STATUS_MARKED) . ') AS phenotypes, ' .
'COUNT(g2d.geneid) AS gene_count, ' .
'GROUP_CONCAT(DISTINCT g2d.geneid ORDER BY g2d.geneid SEPARATOR ";") AS _genes';
$this->aSQLViewList['FROM'] = TABLE_DISEASES . ' AS d ' .
......@@ -201,10 +201,10 @@ class LOVD_Disease extends LOVD_Object {
'tissues' => 'Associated tissues',
'features' => 'Disease features',
'remarks' => 'Remarks',
'created_by_' => array('Created by', LEVEL_COLLABORATOR),
'created_date_' => array('Date created', LEVEL_COLLABORATOR),
'edited_by_' => array('Last edited by', LEVEL_COLLABORATOR),
'edited_date_' => array('Date last edited', LEVEL_COLLABORATOR),
'created_by_' => array('Created by', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_date_' => array('Date created', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_by_' => array('Last edited by', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_date_' => array('Date last edited', $_SETT['user_level_settings']['see_nonpublic_data']),
);
// List of columns and (default?) order for viewing a list of entries.
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2010-12-15
* Modified : 2019-08-28
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -53,7 +53,7 @@ class LOVD_Gene extends LOVD_Object {
function __construct ()
{
// Default constructor.
global $_AUTH, $_DB;
global $_AUTH, $_DB, $_SETT;
// SQL code for loading an entry for an edit form.
$this->sSQLLoadEntry = 'SELECT g.*, ' .
......@@ -82,7 +82,7 @@ class LOVD_Gene extends LOVD_Object {
'LEFT OUTER JOIN ' . TABLE_GEN2DIS . ' AS g2d ON (g.id = g2d.geneid) ' .
'LEFT OUTER JOIN ' . TABLE_DISEASES . ' AS d ON (g2d.diseaseid = d.id) ' .
'LEFT OUTER JOIN ' . TABLE_CURATES . ' AS u2g ON (g.id = u2g.geneid) ' .
'LEFT OUTER JOIN ' . TABLE_USERS . ' AS ua ON (u2g.userid = ua.id' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : ' AND u2g.show_order > 0') . ') ' .
'LEFT OUTER JOIN ' . TABLE_USERS . ' AS ua ON (u2g.userid = ua.id' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' : ' AND u2g.show_order > 0') . ') ' .
'LEFT OUTER JOIN ' . TABLE_USERS . ' AS uc ON (g.created_by = uc.id) ' .
'LEFT OUTER JOIN ' . TABLE_USERS . ' AS ue ON (g.edited_by = ue.id) ' .
'LEFT OUTER JOIN ' . TABLE_USERS . ' AS uu ON (g.updated_by = uu.id) ' .
......@@ -107,7 +107,7 @@ class LOVD_Gene extends LOVD_Object {
(LOVD_plus? '' :
// Speed optimization by skipping variant counts.
'LEFT OUTER JOIN ' . TABLE_VARIANTS_ON_TRANSCRIPTS . ' AS vot ON (t.id = vot.transcriptid) ' .
'LEFT OUTER JOIN ' . TABLE_VARIANTS . ' AS vog ON (vot.id = vog.id' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : ' AND vog.statusid >= ' . STATUS_MARKED) . ') ') .
'LEFT OUTER JOIN ' . TABLE_VARIANTS . ' AS vog ON (vot.id = vog.id' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' : ' AND vog.statusid >= ' . STATUS_MARKED) . ') ') .
'LEFT OUTER JOIN ' . TABLE_DISEASES . ' AS d ON (g2d.diseaseid = d.id)';
$this->aSQLViewList['GROUP_BY'] = 'g.id';
......@@ -129,19 +129,19 @@ class LOVD_Gene extends LOVD_Object {
'reference' => 'Citation reference(s)',
'refseq_url_' => 'Refseq URL',
'curators_' => 'Curators',
'collaborators_' => array('Collaborators', LEVEL_COLLABORATOR),
'collaborators_' => array('Collaborators', $_SETT['user_level_settings']['see_nonpublic_data']),
'variants_' => 'Total number of public variants reported',
'uniq_variants_' => 'Unique public DNA variants reported',
'count_individuals' => 'Individuals with public variants',
'hidden_variants_' => 'Hidden variants',
'allow_download_' => array('Allow public to download linked information', LEVEL_COLLABORATOR),
'allow_download_' => array('Allow public to download linked information', $_SETT['user_level_settings']['see_nonpublic_data']),
'download_' => 'Download all this gene\'s data',
'note_index' => 'Notes',
'created_by_' => array('Created by', LEVEL_COLLABORATOR),
'created_by_' => array('Created by', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_date_' => 'Date created',
'edited_by_' => array('Last edited by', LEVEL_COLLABORATOR),
'edited_date_' => array('Date last edited', LEVEL_COLLABORATOR),
'updated_by_' => array('Last updated by', LEVEL_COLLABORATOR),
'edited_by_' => array('Last edited by', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_date_' => array('Date last edited', $_SETT['user_level_settings']['see_nonpublic_data']),
'updated_by_' => array('Last updated by', $_SETT['user_level_settings']['see_nonpublic_data']),
'updated_date_' => 'Date last updated',
'version_' => 'Version',
'TableEnd_General' => '',
......@@ -584,7 +584,7 @@ class LOVD_Gene extends LOVD_Object {
}
$this->aColumnsViewEntry['curators_'] .= ' (' . $nCurators . ')';
if ($_AUTH['level'] >= LEVEL_COLLABORATOR) {
if ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']) {
// Collaborator string.
$i = 0;
foreach ($aCollaborators as $nUserID => $sName) {
......@@ -620,12 +620,12 @@ class LOVD_Gene extends LOVD_Object {
$zData['version_'] = '<B>' . $zData['id'] . date(':ymd', strtotime($zData['updated_date_'])) . '</B>';
} else {
unset($this->aColumnsViewEntry['version_']);
if ($_AUTH['level'] < LEVEL_COLLABORATOR) {
if ($_AUTH['level'] < $_SETT['user_level_settings']['see_nonpublic_data']) {
// Also unset the empty updated_date field; users lower than collaborator don't see the updated_by field, either.
unset($this->aColumnsViewEntry['updated_date_']);
}
}
if ($_AUTH['level'] < LEVEL_COLLABORATOR) {
if ($_AUTH['level'] < $_SETT['user_level_settings']['see_nonpublic_data']) {
// Public, change date timestamps to human readable format.
$zData['created_date_'] = date('F d, Y', strtotime($zData['created_date_']));
$zData['updated_date_'] = date('F d, Y', strtotime($zData['updated_date_']));
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2010-12-20
* Modified : 2019-09-05
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -122,14 +122,14 @@ class LOVD_GenomeVariant extends LOVD_Custom {
),
$this->buildViewEntry(),
array(
'mapping_flags_' => array('Automatic mapping', LEVEL_COLLABORATOR),
'mapping_flags_' => array('Automatic mapping', $_SETT['user_level_settings']['see_nonpublic_data']),
'average_frequency_' => 'Average frequency (large NGS studies)',
'owned_by_' => 'Owner',
'status' => array('Variant data status', LEVEL_COLLABORATOR),
'created_by_' => array('Created by', LEVEL_COLLABORATOR),
'created_date_' => array('Date created', LEVEL_COLLABORATOR),
'edited_by_' => array('Last edited by', LEVEL_COLLABORATOR),
'edited_date_' => array('Date last edited', LEVEL_COLLABORATOR),
'status' => array('Variant data status', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_by_' => array('Created by', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_date_' => array('Date created', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_by_' => array('Last edited by', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_date_' => array('Date last edited', $_SETT['user_level_settings']['see_nonpublic_data']),
));
if (!LOVD_plus) {
unset($this->aColumnsViewEntry['curation_status_']);
......@@ -176,7 +176,7 @@ class LOVD_GenomeVariant extends LOVD_Custom {
'status' => array(
'view' => array('Status', 70),
'db' => array('ds.name', false, true),
'auth' => LEVEL_COLLABORATOR),
'auth' => $_SETT['user_level_settings']['see_nonpublic_data']),
'created_by' => array(
'view' => false,
'db' => array('vog.created_by', false, true)),
......@@ -464,7 +464,7 @@ class LOVD_GenomeVariant extends LOVD_Custom {
foreach ($zData['individuals'] as $aIndividual) {
list($nID, $nStatusID) = $aIndividual;
$zData['individualid_'] .= ($zData['individualid_']? ', ' : '') . '<A href="individuals/' . $nID . '">' . $nID . '</A>';
if ($_AUTH['level'] >= LEVEL_COLLABORATOR) {
if ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']) {
$zData['individualid_'] .= ' <SPAN style="color : #' . $this->getStatusColor($nStatusID) . '">(' . $_SETT['data_status'][$nStatusID] . ')</SPAN>';
}
}
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2011-02-16
* Modified : 2019-08-28
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -100,7 +100,7 @@ class LOVD_Individual extends LOVD_Custom {
(LOVD_plus? '' :
'GROUP_CONCAT(DISTINCT s2g.geneid ORDER BY s2g.geneid SEPARATOR ", ") AS genes_screened_, ' .
'GROUP_CONCAT(DISTINCT t.geneid ORDER BY t.geneid SEPARATOR ", ") AS variants_in_genes_, ' .
'COUNT(DISTINCT ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? 's2v.variantid' : 'vog.id') . ') AS variants_, ' // Counting s2v.variantid will not include the limit opposed to vog in the join's ON() clause.
'COUNT(DISTINCT ' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? 's2v.variantid' : 'vog.id') . ') AS variants_, ' // Counting s2v.variantid will not include the limit opposed to vog in the join's ON() clause.
) .
'uo.name AS owned_by_, ' .
'CONCAT_WS(";", uo.id, uo.name, uo.email, uo.institute, uo.department, IFNULL(uo.countryid, "")) AS _owner, ' .
......@@ -116,10 +116,10 @@ class LOVD_Individual extends LOVD_Custom {
'LEFT OUTER JOIN ' . TABLE_SCREENINGS . ' AS s ON (i.id = s.individualid) ' .
(LOVD_plus? '' :
'LEFT OUTER JOIN ' . TABLE_SCR2VAR . ' AS s2v ON (s2v.screeningid = s.id) ' .
($_AUTH['level'] >= LEVEL_COLLABORATOR? '' :
($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' :
'LEFT OUTER JOIN ' . TABLE_VARIANTS . ' AS vog ON (s2v.variantid = vog.id AND (vog.statusid >= ' . STATUS_MARKED . (!$_AUTH? '' : ' OR vog.created_by = "' . $_AUTH['id'] . '" OR vog.owned_by IN (' . $sOwnerIDsSQL . ')') . ')) ') .
'LEFT OUTER JOIN ' . TABLE_SCR2GENE . ' AS s2g ON (s.id = s2g.screeningid) ' .
'LEFT OUTER JOIN ' . TABLE_VARIANTS_ON_TRANSCRIPTS . ' AS vot ON (' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? 's2v.variantid' : 'vog.id') . ' = vot.id) ' .
'LEFT OUTER JOIN ' . TABLE_VARIANTS_ON_TRANSCRIPTS . ' AS vot ON (' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? 's2v.variantid' : 'vog.id') . ' = vot.id) ' .
'LEFT OUTER JOIN ' . TABLE_TRANSCRIPTS . ' AS t ON (t.id = vot.transcriptid) '
) .
'LEFT OUTER JOIN ' . TABLE_USERS . ' AS uo ON (i.owned_by = uo.id) ' .
......@@ -147,11 +147,11 @@ class LOVD_Individual extends LOVD_Custom {
'diseases_' => 'Diseases',
'parents_' => 'Parent(s)',
'owned_by_' => 'Owner name',
'status' => array('Individual data status', LEVEL_COLLABORATOR),
'created_by_' => array('Created by', LEVEL_COLLABORATOR),
'created_date_' => array('Date created', LEVEL_COLLABORATOR),
'edited_by_' => array('Last edited by', LEVEL_COLLABORATOR),
'edited_date_' => array('Date last edited', LEVEL_COLLABORATOR),
'status' => array('Individual data status', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_by_' => array('Created by', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_date_' => array('Date created', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_by_' => array('Last edited by', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_date_' => array('Date last edited', $_SETT['user_level_settings']['see_nonpublic_data']),
));
// List of columns and (default?) order for viewing a list of entries.
......@@ -212,7 +212,7 @@ class LOVD_Individual extends LOVD_Custom {
'status' => array(
'view' => array('Status', 70),
'db' => array('ds.name', false, true),
'auth' => LEVEL_COLLABORATOR),
'auth' => $_SETT['user_level_settings']['see_nonpublic_data']),
'created_by' => array(
'view' => false,
'db' => array('i.created_by', false, true)),
......@@ -299,8 +299,8 @@ class LOVD_Individual extends LOVD_Custom {
}
}
$aDiseases = array_keys($this->aFormData['aDiseases'][5]);
if (!empty($aData['active_diseases'])) {
$aDiseases = array_keys($this->aFormData['aDiseases'][5]);
if (count($aData['active_diseases']) > 1 && in_array('00000', $aData['active_diseases'])) {
lovd_errorAdd('active_diseases', 'You cannot select both "Healthy/Control" and a disease for the same individual entry.');
} else {
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2011-02-16
* Modified : 2019-09-04
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -54,6 +54,7 @@ class LOVD_Phenotype extends LOVD_Custom {
function __construct ($sObjectID = '', $nID = '')
{
// Default constructor.
global $_SETT;
if (LOVD_plus) {
// We don't have shared custom columns in LOVD+.
......@@ -107,11 +108,11 @@ class LOVD_Phenotype extends LOVD_Custom {
$this->buildViewEntry(),
array(
'owned_by_' => 'Owner name',
'status' => array('Phenotype data status', LEVEL_COLLABORATOR),
'created_by_' => array('Created by', LEVEL_COLLABORATOR),
'created_date_' => array('Date created', LEVEL_COLLABORATOR),
'edited_by_' => array('Last edited by', LEVEL_COLLABORATOR),
'edited_date_' => array('Date last edited', LEVEL_COLLABORATOR),
'status' => array('Phenotype data status', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_by_' => array('Created by', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_date_' => array('Date created', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_by_' => array('Last edited by', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_date_' => array('Date last edited', $_SETT['user_level_settings']['see_nonpublic_data']),
));
// List of columns and (default?) order for viewing a list of entries.
......@@ -132,7 +133,7 @@ class LOVD_Phenotype extends LOVD_Custom {
'status' => array(
'view' => array('Status', 70),
'db' => array('ds.name', false, true),
'auth' => LEVEL_COLLABORATOR),
'auth' => $_SETT['user_level_settings']['see_nonpublic_data']),
'individualid' => array(
'view' => array('Individual ID', 70, 'style="text-align : right;"'),
'db' => array('p.individualid', 'ASC', true)),
......@@ -258,7 +259,7 @@ class LOVD_Phenotype extends LOVD_Custom {
if ($sView == 'entry') {
$zData['individualid_'] = '<A href="individuals/' . $zData['individualid'] . '">' . $zData['individualid'] . '</A>';
if ($_AUTH['level'] >= LEVEL_COLLABORATOR) {
if ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']) {
$zData['individualid_'] .= ' <SPAN style="color : #' . $this->getStatusColor($zData['individual_statusid']) . '">(' . $_SETT['data_status'][$zData['individual_statusid']] . ')</SPAN>';
}
$zData['disease_'] = '<A href="diseases/' . $zData['diseaseid'] . '">' . $zData['disease'] . '</A>';
......
......@@ -4,10 +4,10 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2011-03-18
* Modified : 2017-11-30
* For LOVD : 3.0-21
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2017 Leiden University Medical Center; http://www.LUMC.nl/
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
* Programmers : Ivar C. Lugtenburg <I.C.Lugtenburg@LUMC.nl>
* Ivo F.A.C. Fokkema <I.F.A.C.Fokkema@LUMC.nl>
* Daan Asscheman <D.Asscheman@LUMC.nl>
......@@ -54,7 +54,7 @@ class LOVD_Screening extends LOVD_Custom {
function __construct ()
{
// Default constructor.
global $_AUTH;
global $_AUTH, $_SETT;
// SQL code for loading an entry for an edit form.
// FIXME; change owner to owned_by_ in the load entry query below.
......@@ -71,7 +71,7 @@ class LOVD_Screening extends LOVD_Custom {
$this->aSQLViewEntry['SELECT'] = 's.*, ' .
'i.statusid AS individual_statusid, ' .
'GROUP_CONCAT(DISTINCT "=\"", s2g.geneid, "\"" SEPARATOR "|") AS search_geneid, ' .
'IF(s.variants_found = 1 AND COUNT(s2v.variantid) = 0, -1, COUNT(DISTINCT ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? 's2v.variantid' : 'vog.id') . ')) AS variants_found_, ' .
'IF(s.variants_found = 1 AND COUNT(s2v.variantid) = 0, -1, COUNT(DISTINCT ' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? 's2v.variantid' : 'vog.id') . ')) AS variants_found_, ' .
'uo.name AS owned_by_, ' .
'uc.name AS created_by_, ' .
'ue.name AS edited_by_';
......@@ -83,7 +83,7 @@ class LOVD_Screening extends LOVD_Custom {
$this->aSQLViewEntry['FROM'] = TABLE_SCREENINGS . ' AS s ' .
'LEFT OUTER JOIN ' . TABLE_SCR2GENE . ' AS s2g ON (s.id = s2g.screeningid) ' .
'LEFT OUTER JOIN ' . TABLE_SCR2VAR . ' AS s2v ON (s.id = s2v.screeningid) ' .
($_AUTH['level'] >= LEVEL_COLLABORATOR? '' :
($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' :
'LEFT OUTER JOIN ' . TABLE_VARIANTS . ' AS vog ON (s2v.variantid = vog.id AND (vog.statusid >= ' . STATUS_MARKED . (!$_AUTH? '' : ' OR vog.created_by = "' . $_AUTH['id'] . '" OR vog.owned_by IN (' . $sOwnerIDsSQL . ')') . ')) ') .
'LEFT OUTER JOIN ' . TABLE_USERS . ' AS uo ON (s.owned_by = uo.id) ' .
'LEFT OUTER JOIN ' . TABLE_INDIVIDUALS . ' AS i ON (s.individualid = i.id) ' .
......@@ -94,14 +94,14 @@ class LOVD_Screening extends LOVD_Custom {
// SQL code for viewing the list of screenings
$this->aSQLViewList['SELECT'] = 's.*, ' .
's.id AS screeningid, ' .
'IF(s.variants_found = 1 AND COUNT(s2v.variantid) = 0, -1, COUNT(DISTINCT ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? 's2v.variantid' : 'vog.id') . ')) AS variants_found_, ' .
'IF(s.variants_found = 1 AND COUNT(s2v.variantid) = 0, -1, COUNT(DISTINCT ' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? 's2v.variantid' : 'vog.id') . ')) AS variants_found_, ' .
'GROUP_CONCAT(DISTINCT s2g.geneid SEPARATOR ", ") AS genes, ' .
'i.statusid, ' .
'uo.name AS owned_by_, ' .
'CONCAT_WS(";", uo.id, uo.name, uo.email, uo.institute, uo.department, IFNULL(uo.countryid, "")) AS _owner';
$this->aSQLViewList['FROM'] = TABLE_SCREENINGS . ' AS s ' .
'LEFT OUTER JOIN ' . TABLE_SCR2VAR . ' AS s2v ON (s.id = s2v.screeningid) ' .
($_AUTH['level'] >= LEVEL_COLLABORATOR? '' :
($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' :
'LEFT OUTER JOIN ' . TABLE_VARIANTS . ' AS vog ON (s2v.variantid = vog.id AND (vog.statusid >= ' . STATUS_MARKED . (!$_AUTH? '' : ' OR vog.created_by = "' . $_AUTH['id'] . '" OR vog.owned_by IN (' . $sOwnerIDsSQL . ')') . ')) ') .
'LEFT OUTER JOIN ' . TABLE_SCR2GENE . ' AS s2g ON (s.id = s2g.screeningid) ' .
'LEFT OUTER JOIN ' . TABLE_INDIVIDUALS . ' AS i ON (s.individualid = i.id) ' .
......@@ -120,10 +120,10 @@ class LOVD_Screening extends LOVD_Custom {
array(
'variants_found_' => 'Variants found?',
'owned_by_' => 'Owner name',
'created_by_' => array('Created by', LEVEL_COLLABORATOR),
'created_date' => array('Date created', LEVEL_COLLABORATOR),
'edited_by_' => array('Last edited by', LEVEL_COLLABORATOR),
'edited_date_' => array('Date last edited', LEVEL_COLLABORATOR),
'created_by_' => array('Created by', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_date' => array('Date created', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_by_' => array('Last edited by', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_date_' => array('Date last edited', $_SETT['user_level_settings']['see_nonpublic_data']),
));
// List of columns and (default?) order for viewing a list of entries.
......@@ -278,7 +278,7 @@ class LOVD_Screening extends LOVD_Custom {
if ($sView == 'entry') {
$zData['individualid_'] = '<A href="individuals/' . $zData['individualid'] . '">' . $zData['individualid'] . '</A>';
if ($_AUTH['level'] >= LEVEL_COLLABORATOR) {
if ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']) {
$zData['individualid_'] .= ' <SPAN style="color : #' . $this->getStatusColor($zData['individual_statusid']) . '">(' . $_SETT['data_status'][$zData['individual_statusid']] . ')</SPAN>';
}
}
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2011-05-12
* Modified : 2019-09-04
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -59,7 +59,7 @@ class LOVD_TranscriptVariant extends LOVD_Custom {
function __construct ($sObjectID = '', $nID = '', $bLoadAllTranscripts = true)
{
// Default constructor.
global $_DB;
global $_DB, $_SETT;
if (LOVD_plus) {
// We don't have shared custom columns in LOVD+.
......@@ -154,7 +154,7 @@ class LOVD_TranscriptVariant extends LOVD_Custom {
'status' => array(
'view' => array('Status', 70),
'db' => array('ds.name', false, true),
'auth' => LEVEL_COLLABORATOR),
'auth' => $_SETT['user_level_settings']['see_nonpublic_data']),
));
if (LOVD_plus) {
unset($this->aColumnsViewList['effect']);
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2010-12-20
* Modified : 2019-08-28
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -52,7 +52,7 @@ class LOVD_Transcript extends LOVD_Object {
function __construct ()
{
global $_AUTH;
global $_AUTH, $_SETT;
// Default constructor.
......@@ -81,7 +81,7 @@ class LOVD_Transcript extends LOVD_Object {
if (!LOVD_plus) {
// Speed optimization by skipping variant counts.
$this->aSQLViewList['SELECT'] .= ', ' .
'COUNT(DISTINCT ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? 'vot.id' : 'vog.id') . ') AS variants';
'COUNT(DISTINCT ' . ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? 'vot.id' : 'vog.id') . ') AS variants';
}
$this->aSQLViewList['FROM'] = TABLE_TRANSCRIPTS . ' AS t ' .
'LEFT OUTER JOIN ' . TABLE_GENES . ' AS g ON (t.geneid = g.id) ' .
......@@ -90,7 +90,7 @@ class LOVD_Transcript extends LOVD_Object {
'LEFT OUTER JOIN ' . TABLE_VARIANTS_ON_TRANSCRIPTS . ' AS vot ON (t.id = vot.transcriptid) ' .
// If user is less than a collaborator, only show public variants and
// variants owned/created by him.
($_AUTH['level'] >= LEVEL_COLLABORATOR? '' :
($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']? '' :
'LEFT OUTER JOIN ' . TABLE_VARIANTS . ' AS vog ON ' .
'(vot.id = vog.id AND (vog.statusid >= ' . STATUS_MARKED .
(!$_AUTH? '' :
......@@ -113,10 +113,10 @@ class LOVD_Transcript extends LOVD_Object {
'id_protein_uniprot' => 'Protein - Uniprot ID',
'exon_table' => 'Exon/intron information',
'remarks' => 'Remarks',
'created_by_' => array('Created by', LEVEL_COLLABORATOR),
'created_date_' => array('Date created', LEVEL_COLLABORATOR),
'edited_by_' => array('Last edited by', LEVEL_COLLABORATOR),
'edited_date_' => array('Date last edited', LEVEL_COLLABORATOR),
'created_by_' => array('Created by', $_SETT['user_level_settings']['see_nonpublic_data']),
'created_date_' => array('Date created', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_by_' => array('Last edited by', $_SETT['user_level_settings']['see_nonpublic_data']),
'edited_date_' => array('Date last edited', $_SETT['user_level_settings']['see_nonpublic_data']),
);
// List of columns and (default?) order for viewing a list of entries.
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2009-10-21
* Modified : 2019-09-05
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -1497,7 +1497,7 @@ class LOVD_Object {
{
// Prepares the data by "enriching" the variable received with links, pictures, etc.
// Also quotes all data with htmlspecialchars(), to prevent XSS.
global $_AUTH;
global $_AUTH, $_SETT;
if (!is_array($zData)) {
$zData = array();
......@@ -1561,7 +1561,7 @@ class LOVD_Object {
// Status coloring will only be done, when we have authorization.
// Instead of having the logic in separate objects and the custom VL object, put it together here.
// In LOVD+, we disable the feature of coloring hidden and marked data, since all data is hidden.
if (!LOVD_plus && $_AUTH['level'] >= LEVEL_COLLABORATOR) {
if (!LOVD_plus && $_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']) {
// Loop through possible status fields, always keep the minimum.
foreach (array('statusid', 'var_statusid', 'ind_statusid') as $sField) {
if (!empty($zData[$sField])) {
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2010-12-15
* Modified : 2019-08-27
* Modified : 2019-10-01
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -1394,11 +1394,18 @@ if (PATH_COUNT == 3 && preg_match('/^[a-z][a-z0-9#@-]*$/i', rawurldecode($_PE[1]
// Load authorization, collaborators and up see statistics about all variants, not just the public ones.
lovd_isAuthorized('gene', $sID);
$bSeeNonPublicVariants = ($_AUTH['level'] >= $_SETT['user_level_settings']['see_nonpublic_data']);
// Check if there are variants at all.
$nVariants = $_DB->query('SELECT COUNT(*) FROM ' . TABLE_VARIANTS . ' AS vog INNER JOIN ' . TABLE_VARIANTS_ON_TRANSCRIPTS . ' AS vot USING (id) INNER JOIN ' . TABLE_TRANSCRIPTS . ' AS t ON (vot.transcriptid = t.id) WHERE t.geneid = ?' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : ' AND statusid >= ' . STATUS_MARKED), array($sID))->fetchColumn();
$nVariants = $_DB->query('
SELECT COUNT(*)
FROM ' . TABLE_VARIANTS . ' AS vog
INNER JOIN ' . TABLE_VARIANTS_ON_TRANSCRIPTS . ' AS vot USING (id)
INNER JOIN ' . TABLE_TRANSCRIPTS . ' AS t ON (vot.transcriptid = t.id)
WHERE t.geneid = ?' . ($bSeeNonPublicVariants? '' : ' AND statusid >= ' . STATUS_MARKED),
array($sID))->fetchColumn();
if (!$nVariants) {
lovd_showInfoTable('There are currently no ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants in this gene.', 'stop');
lovd_showInfoTable('There are currently no ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants in this gene.', 'stop');
$_T->printFooter();
exit;
}
......@@ -1422,40 +1429,40 @@ if (PATH_COUNT == 3 && preg_match('/^[a-z][a-z0-9#@-]*$/i', rawurldecode($_PE[1]
// To save ourselves a lot of code, we'll build the DIV containers as templates.
$aGraphs = array(
// Variant types (DNA level).
'Variant type (DNA level, all ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants)' =>
'Variant type (DNA level, all ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants)' =>
array(
'variantsTypeDNA_all' => 'All ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants',
'variantsTypeDNA_unique' => 'Unique ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants',
'variantsTypeDNA_all' => 'All ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants',
'variantsTypeDNA_unique' => 'Unique ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants',
),
// Variant types (DNA level) ((likely) pathogenic only).
'Variant type (DNA level, all ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'pathogenic variants)' =>
'Variant type (DNA level, all ' . ($bSeeNonPublicVariants? '' : 'public ') . 'pathogenic variants)' =>
array(
'variantsTypeDNA_all_pathogenic' => 'All ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'pathogenic variants',
'variantsTypeDNA_unique_pathogenic' => 'Unique ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'pathogenic variants',
'variantsTypeDNA_all_pathogenic' => 'All ' . ($bSeeNonPublicVariants? '' : 'public ') . 'pathogenic variants',
'variantsTypeDNA_unique_pathogenic' => 'Unique ' . ($bSeeNonPublicVariants? '' : 'public ') . 'pathogenic variants',
),
// Variant types (protein level).
'Variant type (Protein level, all ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants) (note: numbers are sums for all transcripts of this gene)' =>
'Variant type (Protein level, all ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants) (note: numbers are sums for all transcripts of this gene)' =>
array(
'variantsTypeProtein_all' => 'All ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants',
'variantsTypeProtein_unique' => 'Unique ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants',
'variantsTypeProtein_all' => 'All ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants',
'variantsTypeProtein_unique' => 'Unique ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants',
),
// Variant types (protein level) ((likely) pathogenic only).
'Variant type (Protein level, all ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'pathogenic variants) (note: numbers are sums for all transcripts of this gene)' =>
'Variant type (Protein level, all ' . ($bSeeNonPublicVariants? '' : 'public ') . 'pathogenic variants) (note: numbers are sums for all transcripts of this gene)' =>
array(
'variantsTypeProtein_all_pathogenic' => 'All ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'pathogenic variants',
'variantsTypeProtein_unique_pathogenic' => 'Unique ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'pathogenic variants',
'variantsTypeProtein_all_pathogenic' => 'All ' . ($bSeeNonPublicVariants? '' : 'public ') . 'pathogenic variants',
'variantsTypeProtein_unique_pathogenic' => 'Unique ' . ($bSeeNonPublicVariants? '' : 'public ') . 'pathogenic variants',
),
// Variant locations (DNA level).
'Variant location (DNA level, all ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants) (note: numbers are sums for all transcripts of this gene)' =>
'Variant location (DNA level, all ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants) (note: numbers are sums for all transcripts of this gene)' =>
array(
'variantsLocations_all' => 'All ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants',
'variantsLocations_unique' => 'Unique ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'variants',
'variantsLocations_all' => 'All ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants',
'variantsLocations_unique' => 'Unique ' . ($bSeeNonPublicVariants? '' : 'public ') . 'variants',
),
// Variant locations (DNA level) ((likely) pathogenic only).
'Variant type (DNA level, all ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'pathogenic variants) (note: numbers are sums for all transcripts of this gene)' =>
'Variant type (DNA level, all ' . ($bSeeNonPublicVariants? '' : 'public ') . 'pathogenic variants) (note: numbers are sums for all transcripts of this gene)' =>
array(
'variantsLocations_all_pathogenic' => 'All ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'pathogenic variants',
'variantsLocations_unique_pathogenic' => 'Unique ' . ($_AUTH['level'] >= LEVEL_COLLABORATOR? '' : 'public ') . 'pathogenic variants',
'variantsLocations_all_pathogenic' => 'All ' . ($bSeeNonPublicVariants? '' : 'public ') . 'pathogenic variants',
'variantsLocations_unique_pathogenic' => 'Unique ' . ($bSeeNonPublicVariants? '' : 'public ') . 'pathogenic variants',
),
);
......@@ -1474,18 +1481,18 @@ if (PATH_COUNT == 3 && preg_match('/^[a-z][a-z0-9#@-]*$/i', rawurldecode($_PE[1]
flush();
$_T->printFooter(false);
$_G->variantsTypeDNA('variantsTypeDNA_all', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), false);
$_G->variantsTypeDNA('variantsTypeDNA_unique', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), true);
$_G->variantsTypeDNA('variantsTypeDNA_all_pathogenic', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), false, true);
$_G->variantsTypeDNA('variantsTypeDNA_unique_pathogenic', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), true, true);
$_G->variantsTypeProtein('variantsTypeProtein_all', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), false, false);
$_G->variantsTypeProtein('variantsTypeProtein_unique', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), true, false);
$_G->variantsTypeProtein('variantsTypeProtein_all_pathogenic', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), false, true);
$_G->variantsTypeProtein('variantsTypeProtein_unique_pathogenic', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), true, true);
$_G->variantsLocations('variantsLocations_all', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), false);
$_G->variantsLocations('variantsLocations_unique', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), true);
$_G->variantsLocations('variantsLocations_all_pathogenic', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), false, true);
$_G->variantsLocations('variantsLocations_unique_pathogenic', $sID, ($_AUTH['level'] >= LEVEL_COLLABORATOR), true, true);
$_G->variantsTypeDNA('variantsTypeDNA_all', $sID, $bSeeNonPublicVariants, false);
$_G->variantsTypeDNA('variantsTypeDNA_unique', $sID, $bSeeNonPublicVariants, true);
$_G->variantsTypeDNA('variantsTypeDNA_all_pathogenic', $sID, $bSeeNonPublicVariants, false, true);
$_G->variantsTypeDNA('variantsTypeDNA_unique_pathogenic', $sID, $bSeeNonPublicVariants, true, true);
$_G->variantsTypeProtein('variantsTypeProtein_all', $sID, $bSeeNonPublicVariants, false, false);
$_G->variantsTypeProtein('variantsT