Bug 14636: Follow-up - fix typo in system preference name

The preference is named "marcflavour" not "marcflavor".

Without this change, search will always use "copyrightyear"
and break search by publication date for UNIMARC.

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Katrin Fischer 2015-11-25 18:00:33 +01:00 committed by Kyle M Hall
parent 2d0d717301
commit 99a1d7f18a

View file

@ -128,7 +128,7 @@ if (scalar keys %params > 0) {
my $op = shift @op;
if (defined $q and $q ne '') {
if ($i == 0) {
if (C4::Context->preference("marcflavor") ne "UNIMARC" && $field eq 'publicationyear') {
if (C4::Context->preference("marcflavour") ne "UNIMARC" && $field eq 'publicationyear') {
$field = 'copyrightdate';
}
$f = {
@ -185,7 +185,7 @@ if (scalar keys %params > 0) {
}
my $sortby = $cgi->param('sortby') || 'itemnumber';
if (C4::Context->preference("marcflavor") ne "UNIMARC" && $sortby eq 'publicationyear') {
if (C4::Context->preference("marcflavour") ne "UNIMARC" && $sortby eq 'publicationyear') {
$sortby = 'copyrightdate';
}
warn $sortby;