diff --git a/C4/Search.pm b/C4/Search.pm index f93dd153a2..357f73539a 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1569,6 +1569,13 @@ sub buildQuery { $remove_stopwords ) = ( 0, 0, 0, 0, 0 ); + if ( $index eq 'nb' ) { + if ( C4::Context->preference("SearchWithISBNVariations") ) { + my @isbns = C4::Koha::GetVariationsOfISBN( $operand ); + $operands[$i] = $operand = '(nb=' . join(' OR nb=', @isbns) . ')'; + $indexes[$i] = $index = ''; + } + } } if(not $index){ diff --git a/installer/data/mysql/sysprefs.sql b/installer/data/mysql/sysprefs.sql index 878214fd0b..be4461189c 100644 --- a/installer/data/mysql/sysprefs.sql +++ b/installer/data/mysql/sysprefs.sql @@ -367,6 +367,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded