Commit bb54dd23 authored by Ivo Fokkema's avatar Ivo Fokkema

Fixed bug; The installer was broken because LOVD+ code got activated by accident.

- Also, fixed notice when running new code on an old database backend.
parent 75797940
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2009-10-23
* Modified : 2019-08-28
* Modified : 2019-08-29
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -263,26 +263,28 @@ class LOVD_SystemSetting extends LOVD_Object {
// Remove features that are anyway currently not developed yet. They can confuse users.
unset($this->aFormData['feed_history'], $this->aFormData['count_hidden_data'], $this->aFormData['use_versioning']);
// Remove features currently unavailable for LOVD+ (or that we choose not to support).
foreach ($this->aFormData as $nKey => $aFormEntry) {
// Unset whole ranges of options, easier to do like this than to name all of the options.
if (isset($this->aFormData[$nKey]) && is_array($aFormEntry)
&& strpos($aFormEntry[3], '<B>Customize LOVD</B>') !== false) {
unset($this->aFormData[$nKey], $this->aFormData[$nKey+1], $this->aFormData[$nKey+2],
$this->aFormData[$nKey+3], $this->aFormData[$nKey+4], $this->aFormData[$nKey+5],
$this->aFormData[$nKey+6], $this->aFormData[$nKey+7]);
continue;
} elseif (isset($this->aFormData[$nKey]) && is_array($aFormEntry)
&& strpos($aFormEntry[3], '<B>Global LOVD statistics</B>') !== false) {
unset($this->aFormData[$nKey], $this->aFormData[$nKey+1], $this->aFormData[$nKey+2],
$this->aFormData[$nKey+3], $this->aFormData[$nKey+4], $this->aFormData[$nKey+5],
$this->aFormData[$nKey+6], $this->aFormData[$nKey+7]);
continue;
} elseif (isset($this->aFormData[$nKey]) && is_array($aFormEntry)
&& in_array($aFormEntry[3], array('allow_submitter_registration', 'allow_submitter_mods'))) {
unset($this->aFormData[$nKey]);
if (LOVD_plus) {
// Remove features currently unavailable for LOVD+ (or that we choose not to support).
foreach ($this->aFormData as $nKey => $aFormEntry) {
// Unset whole ranges of options, easier to do like this than to name all of the options.
if (isset($this->aFormData[$nKey]) && is_array($aFormEntry)
&& strpos($aFormEntry[3], '<B>Customize LOVD</B>') !== false) {
unset($this->aFormData[$nKey], $this->aFormData[$nKey + 1], $this->aFormData[$nKey + 2],
$this->aFormData[$nKey + 3], $this->aFormData[$nKey + 4], $this->aFormData[$nKey + 5],
$this->aFormData[$nKey + 6], $this->aFormData[$nKey + 7]);
continue;
} elseif (isset($this->aFormData[$nKey]) && is_array($aFormEntry)
&& strpos($aFormEntry[3], '<B>Global LOVD statistics</B>') !== false) {
unset($this->aFormData[$nKey], $this->aFormData[$nKey + 1], $this->aFormData[$nKey + 2],
$this->aFormData[$nKey + 3], $this->aFormData[$nKey + 4], $this->aFormData[$nKey + 5],
$this->aFormData[$nKey + 6], $this->aFormData[$nKey + 7]);
continue;
} elseif (isset($this->aFormData[$nKey]) && is_array($aFormEntry)
&& in_array($aFormEntry[3], array('allow_submitter_registration', 'allow_submitter_mods'))) {
unset($this->aFormData[$nKey]);
}
}
}
......
......@@ -4,7 +4,7 @@
* LEIDEN OPEN VARIATION DATABASE (LOVD)
*
* Created : 2012-03-27
* Modified : 2019-08-28
* Modified : 2019-08-29
* For LOVD : 3.0-22
*
* Copyright : 2004-2019 Leiden University Medical Center; http://www.LUMC.nl/
......@@ -679,7 +679,7 @@ foreach ($zAnnouncements as $zAnnouncement) {
' <A href="users/' . $_AUTH['id'] . '"><B>Your account</B></A> | ' . (false && $_AUTH['level'] == LEVEL_SUBMITTER && $_CONF['allow_submitter_mods']? '<A href="variants?search_created_by=' . $_AUTH['id'] . '"><B>Your submissions</B></A> | ' : '') . (!empty($_AUTH['saved_work']['submissions']['individual']) || !empty($_AUTH['saved_work']['submissions']['screening'])? '<A href="users/' . $_AUTH['id'] . '?submissions"><B>Unfinished submissions</B></A> | ' : '') . '<A href="logout"><B>Log out</B></A>' . "\n");
} else {
// LOVD+ doesn't allow for submitter registrations, because submitters already achieve rights.
print(' ' . (LOVD_plus || !$_CONF['allow_submitter_registration'] || $_CONF['lovd_read_only']? '' : '<A href="users?register"><B>Register as submitter</B></A> | ') .
print(' ' . (LOVD_plus || empty($_CONF['allow_submitter_registration']) || $_CONF['lovd_read_only']? '' : '<A href="users?register"><B>Register as submitter</B></A> | ') .
'<A href="login"><B>Log in</B></A>' . "\n");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment