@@ -, +, @@ authorize value ------- whose codes and descriptions correspond to the list of "item types" available on the patron suggestion form. --- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 1 file changed, 15 insertions(+) --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -37,6 +37,7 @@ use Getopt::Long; use C4::Context; use C4::Installer; use C4::Dates; +use C4::Koha qw/GetSupportList/; use MARC::Record; use MARC::File::XML ( BinaryEncoding => 'utf8' ); @@ -8369,6 +8370,20 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.15.00.XXX"; +if ( CheckVersion($DBversion) ) { + foreach my $format (@{ GetSupportList() }) { + $dbh->do( + q/INSERT INTO authorised_values (category, authorised_value, lib, lib_opac, imageurl) + VALUES (?, ?, ?, ?, ?)/, + {}, + 'SUGGEST_FORMAT', $format->{itemtype}, $format->{description}, $format->{description}, $format->{imageurl} + ); + } + print "Upgrade to $DBversion done (Bug 9468: create new SUGGEST_FORMAT authorised_value list)\n"; + SetVersion($DBversion); +} + =head1 FUNCTIONS =head2 TableExists($table) --