@@ -, +, @@ ------- whose codes and descriptions correspond to the list of "item types" available on the patron suggestion form. --- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -39,6 +39,7 @@ use C4::Installer; use C4::Dates; use Koha::Database; use Koha; +use C4::Koha qw/GetSupportList/; use MARC::Record; use MARC::File::XML ( BinaryEncoding => 'utf8' ); @@ -11310,6 +11311,20 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.19.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); +} + # 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. --