$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){
('SCOUserCSS','',NULL,'Add CSS to be included in the SCO module in an embedded <style> tag.','free'),
('SCOUserJS','',NULL,'Define custom javascript for inclusion in the SCO module','free'),
('SearchMyLibraryFirst','0',NULL,'If ON, OPAC searches return results limited by the user\'s library by default if they are logged in','YesNo'),
+('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo'),
('SelfCheckHelpMessage','','70|10','Enter HTML to include under the basic Web-based Self Checkout instructions on the Help page','Textarea'),
('SelfCheckReceiptPrompt','1','NULL','If ON, print receipt dialog pops up when self checkout is finished','YesNo'),
('SelfCheckTimeout','120','','Define the number of seconds before the Web-based Self Checkout times out a patron','Integer'),
SetVersion ($DBversion);
}
+$DBversion = "3.19.00.XXX";
+if ( CheckVersion($DBversion) ) {
+ $dbh->do(q|
+ INSERT INTO systempreferences ( variable, value, options, explanation, type ) VALUES
+ ('SearchWithISBNVariations','0',NULL,'If enabled, search on all variations of the ISBN','YesNo')
+ |);
+ print "Upgrade to $DBversion done (Bug 13528 - Add the SearchWithISBNVariations syspref)\n";
+ SetVersion ($DBversion);
+}
+
# DEVELOPER PROCESS, search for anything to execute in the db_update directory
# SEE bug 13068
# if there is anything in the atomicupdate, read and execute it.
- Use the following text as separator for UNIMARC authors facets
- pref: UNIMARCAuthorsFacetsSeparator
class: short
+ -
+ - When searching on the ISBN index,
+ - pref: SearchWithISBNVariations
+ choices:
+ yes: "search"
+ no: "don't search"
+ - on all variations of the ISBN. Note that this preference has no effect if UseQueryParser is on.