@@ -, +, @@ --- C4/Members.pm | 2 +- installer/data/mysql/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 11 +++++++++++ .../prog/en/modules/admin/preferences/patrons.pref | 6 ++++++ 4 files changed, 19 insertions(+), 1 deletions(-) --- a/C4/Members.pm +++ a/C4/Members.pm @@ -227,7 +227,7 @@ sub Search { } } - if ( !$found_borrower && C4::Context->preference('ExtendedPatronAttributes') && $search_string ) { + if ( !$found_borrower && C4::Context->preference('ExtendedPatronAttributesSearch') && $search_string ) { my $matching_records = C4::Members::Attributes::SearchIdMatchingAttribute($search_string); if(scalar(@$matching_records)>0) { if ( my $fr = ref $filter ) { --- a/installer/data/mysql/sysprefs.sql +++ a/installer/data/mysql/sysprefs.sql @@ -195,6 +195,7 @@ INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES INSERT INTO `systempreferences` (variable, value,options,type, explanation) VALUES ('AddPatronLists','categorycode','categorycode|category_type','Choice','Allow user to choose what list to pick up from when adding patrons'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ExtendedPatronAttributes','0','Use extended patron IDs and attributes',NULL,'YesNo'); +INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('ExtendedPatronAttributesSearch','0','Search on extended patron IDs and attributes',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('RenewSerialAddsSuggestion','0','If ON, adds a new suggestion at serial subscription renewal',NULL,'YesNo'); INSERT INTO `systempreferences` (variable,value,explanation,options,type) VALUES('GoogleJackets','0','if ON, displays jacket covers from Google Books API',NULL,'YesNo'); --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -5212,6 +5212,17 @@ if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.08.00.XXX"; +if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) { + $dbh->do(" + INSERT INTO systempreferences (variable,value,explanation,options,type) + VALUES ('ExtendedPatronAttributesSearch',?,'Search on extended patron IDs and attributes',NULL,'YesNo')", + undef, C4::Context->preference("ExtendedPatronAttributes") + ); + print "Upgrade to $DBversion done\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/patrons.pref @@ -68,6 +68,12 @@ Patrons: no: "Don't enable" - searching, editing and display of custom attributes on patrons. - + - pref: ExtendedPatronAttributesSearch + choices: + yes: Search + no: "Don't search" + - on a patron's extended attributes. + - - pref: intranetreadinghistory choices: yes: "Allow" --