@@ -, +, @@ multi-valuated prefs --- a/admin/preferences.pl +++ a/admin/preferences.pl @@ -106,7 +106,7 @@ sub _get_chunk { keys %{ $options{'choices'} } ]; } elsif ( $options{'multiple'} ) { - my @values = split /\|/, $value; + my @values = split /,/, $value; $chunk->{type} = 'multiple'; $chunk->{CHOICES} = [ sort { $a->{'text'} cmp $b->{'text'} } --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -229,8 +229,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OCLCAffiliateID','','','Use with FRBRizeEditions and XISBN. You can sign up for an AffiliateID here: http://www.worldcat.org/wcpa/do/AffiliateUserServices?method=initSelfRegister','free'), ('OPACAcquisitionDetails','0','','Show the acquisition details at the OPAC','YesNo'), ('OpacAddMastheadLibraryPulldown','0','','Adds a pulldown menu to select the library to search on the opac masthead.','YesNo'), -('OpacAdvSearchMoreOptions','pubdate|itemtype|language|subtype|sorting|location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'), -('OpacAdvSearchOptions','pubdate|itemtype|language|sorting|location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'), +('OpacAdvSearchMoreOptions','pubdate,itemtype,language,subtype,sorting,location','Show search options for the expanded view (More options)','pubdate|itemtype|language|subtype|sorting|location','multiple'), +('OpacAdvSearchOptions','pubdate,itemtype,language,sorting,location','Show search options','pubdate|itemtype|language|subtype|sorting|location','multiple'), ('OPACAllowHoldDateInFuture','0','','If set, along with the AllowHoldDateInFuture system preference, OPAC users can set the date of a hold to be in the future.','YesNo'), ('OpacAllowPublicListCreation','1',NULL,'If set, allows opac users to create public lists','YesNo'), ('OpacAllowSharingPrivateLists','0',NULL,'If set, allows opac users to share private lists with other patrons','YesNo'), --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -9505,6 +9505,20 @@ CREATE TABLE borrower_sync ( SetVersion($DBversion); } +$DBversion = "3.17.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(q{ + UPDATE systempreferences SET value = 'pubdate,itemtype,language,sorting,location' WHERE variable='OpacAdvSearchOptions' + }); + + $dbh->do(q{ + UPDATE systempreferences SET value = 'pubdate,itemtype,language,subtype,sorting,location' WHERE variable='OpacAdvSearchMoreOptions' + }); + + print "Upgrade to $DBversion done (Bug 9043 - Update the values for OpacAdvSearchOptions and OpacAdvSearchOptions)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/opac/opac-search.pl +++ a/opac/opac-search.pl @@ -307,8 +307,8 @@ if ( $template_type && $template_type eq 'advsearch' ) { } - my @advsearch_limits = split /\|/, C4::Context->preference('OpacAdvSearchOptions'); - my @advsearch_more_limits = split /\|/, + my @advsearch_limits = split /,/, C4::Context->preference('OpacAdvSearchOptions'); + my @advsearch_more_limits = split /,/, C4::Context->preference('OpacAdvSearchMoreOptions'); $template->param( uc( C4::Context->preference("marcflavour") ) => 1, # we already did this for UNIMARC --- a/svc/config/systempreferences +++ a/svc/config/systempreferences @@ -95,7 +95,7 @@ sub set_preferences { next if ( !defined( $pref ) ); - my $value = join( '|', $query->param( $param ) ); + my $value = join( ',', $query->param( $param ) ); C4::Context->set_preference( $pref, $value ); logaction( 'SYSTEMPREFERENCE', 'MODIFY', undef, $pref . " | " . $value ); --