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>
(cherry picked from commit 99a1d7f18a)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
(cherry picked from commit 42f3e0d9ed)
Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
This commit is contained in:
Katrin Fischer 2015-11-25 18:00:33 +01:00 committed by Frédéric Demians
parent 836958ad60
commit 3c16c8423b
1 changed files with 2 additions and 2 deletions

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;