Skip to content
Snippets Groups Projects
Commit 92dfe76f authored by Gerhard Gonter's avatar Gerhard Gonter :speech_balloon:
Browse files

add fixup for fulltext_locked as specified in a meeting on 2020-06-30

parent a4b37a8e
No related branches found
No related tags found
No related merge requests found
...@@ -3248,6 +3248,45 @@ sub get_thesis_data ...@@ -3248,6 +3248,45 @@ sub get_thesis_data
$policies->{lock_status}= 0 if ($policies->{lock_until_date} lt $ts_now); # not locked if lock_until_date is in the past $policies->{lock_status}= 0 if ($policies->{lock_until_date} lt $ts_now); # not locked if lock_until_date is in the past
} }
if ($row->{eprint_status} eq 'buffer')
{
=begin comment
nd 2020-06-30: fixup fulltext_locked for items with eprint_status='buffer' depending on einverstaendnis and sperre
NOTES:
* we use already processed and maybe fixed (read: corrected) values here
* einverstaendnis is used as authorisation_to_use_by_author
* sperre is used as lock_status
* this whole thing aims at those records where einverstaendnis='TRUE' and sperre='FALSE';
for these we should get fulltext_locked=0, most everything else should be fulltext_locked=1,
the few cases that may remain are controlled by full_text_status which is usually 'restricted'
mysql> select count(*), einverstaendnis, sperre, full_text_status
-> from eprint where eprint_status='buffer'
-> group by einverstaendnis, sperre, full_text_status;
+----------+-----------------+--------+------------------+
| count(*) | einverstaendnis | sperre | full_text_status |
+----------+-----------------+--------+------------------+
| 1 | NULL | NULL | none |
| 1 | NULL | NULL | restricted |
| 1 | NULL | TRUE | restricted |
| 5 | TRUE | NULL | restricted |
| 1 | TRUE | TRUE | restricted |
| 2064 | TRUE | FALSE | restricted |
| 4 | FALSE | NULL | restricted |
| 2 | FALSE | TRUE | restricted |
| 2868 | FALSE | FALSE | restricted |
+----------+-----------------+--------+------------------+
=end comment
=cut
$policies->{fulltext_locked}= 0 if ($policies->{authorisation_to_use_by_author} == 1 && $policies->{lock_status} == 0);
$policies->{fulltext_locked}= 1 if ($policies->{authorisation_to_use_by_author} == 0);
}
if ($row->{abstract_nicht_anzeigen} eq 'TRUE') if ($row->{abstract_nicht_anzeigen} eq 'TRUE')
{ {
$policies->{abstract_locked}= $policies->{keywords_locked}= 1; $policies->{abstract_locked}= $policies->{keywords_locked}= 1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment