Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
digibib
koha-docker
Commits
232adcd6
Commit
232adcd6
authored
Aug 31, 2018
by
Petter Goksøyr Åsen
Browse files
plukkliste: better guess at fiction/nonfiction category
parent
977a3cc3
Changes
1
Hide whitespace changes
Inline
Side-by-side
files/cronjobs/holds.compute.pl
View file @
232adcd6
...
@@ -36,6 +36,7 @@ sub category {
...
@@ -36,6 +36,7 @@ sub category {
my
$fmt
=
$meta
{
loc_format
};
# 090$b
my
$fmt
=
$meta
{
loc_format
};
# 090$b
my
$dewey
=
$meta
{
loc_dewey
};
# 090$c
my
$dewey
=
$meta
{
loc_dewey
};
# 090$c
my
$location
=
$meta
{
location
}
//
'';
my
$location
=
$meta
{
location
}
//
'';
my
$fiction
=
$meta
{
fiction
};
if
(
$mt
=~
m{^(Film|Spill|Tegneserie|Noter|Lydbok|Musikkopptak)$}
)
{
if
(
$mt
=~
m{^(Film|Spill|Tegneserie|Noter|Lydbok|Musikkopptak)$}
)
{
return
$mt
;
return
$mt
;
...
@@ -45,13 +46,13 @@ sub category {
...
@@ -45,13 +46,13 @@ sub category {
}
}
if
(
$fmt
=~
m{^\w*[bu]}
or
$location
=~
m{^(BARNEFAG|UNG|UNGFAG)$}
)
{
if
(
$fmt
=~
m{^\w*[bu]}
or
$location
=~
m{^(BARNEFAG|UNG|UNGFAG)$}
)
{
if
(
$
dewey
or
$fmt
=~
m{E}
)
{
if
(
$
fiction
eq
"
0
"
)
{
return
'
Fag barn
';
return
'
Fag barn
';
}
else
{
}
else
{
return
'
Skjønn barn
';
return
'
Skjønn barn
';
}
}
}
else
{
}
else
{
if
(
$
dewey
)
{
if
(
$
fiction
eq
"
0
"
)
{
return
'
Fag voksen
';
return
'
Fag voksen
';
}
else
{
}
else
{
return
'
Skjønn voksen
';
return
'
Skjønn voksen
';
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment