Bugzilla – Attachment 41942 Details for
Bug 9468
Add ability to hide itemtypes from purchase suggestions forms
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9468 [QA Followup] - Remove GetSupportList dependency from updatadatabase.pl
Bug-9468-QA-Followup---Remove-GetSupportList-depen.patch (text/plain), 1.89 KB, created by
Jonathan Druart
on 2015-08-25 16:33:00 UTC
(
hide
)
Description:
Bug 9468 [QA Followup] - Remove GetSupportList dependency from updatadatabase.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2015-08-25 16:33:00 UTC
Size:
1.89 KB
patch
obsolete
>From d1faa61660914c0a9e6959b722ecc2dc4d8b727b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Mon, 24 Aug 2015 06:46:30 -0400 >Subject: [PATCH] Bug 9468 [QA Followup] - Remove GetSupportList dependency > from updatadatabase.pl > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > installer/data/mysql/updatedatabase.pl | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 0925265..828462f 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -39,7 +39,6 @@ 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' ); >@@ -10762,14 +10761,21 @@ if ( CheckVersion($DBversion) ) { > SetVersion ($DBversion); > } > >-$DBversion = "3.19.00.XXX"; >+$DBversion = "3.21.00.XXX"; > if ( CheckVersion($DBversion) ) { >- foreach my $format (@{ GetSupportList() }) { >- $dbh->do(q| >+ my $query = q{ SELECT * FROM itemtypes ORDER BY description }; >+ my $sth = C4::Context->dbh->prepare($query); >+ $sth->execute; >+ $suggestion_formats = $sth->fetchall_arrayref( {} ); >+ >+ foreach my $format (@$suggestion_formats) { >+ $dbh->do( >+ q| > INSERT IGNORE INTO authorised_values (category, authorised_value, lib, lib_opac, imageurl) > VALUES (?, ?, ?, ?, ?) > |, {}, >- 'SUGGEST_FORMAT', $format->{itemtype}, $format->{description}, $format->{description}, $format->{imageurl} >+ '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"; >-- >2.1.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9468
:
14801
|
16647
|
16674
|
19086
|
21759
|
21760
|
22714
|
22715
|
27932
|
27933
|
27934
|
27935
|
37100
|
37101
|
37102
|
37103
|
38097
|
38163
|
38164
|
38165
|
38166
|
38167
|
38168
|
41822
|
41823
|
41824
|
41825
|
41826
|
41827
|
41828
|
41936
|
41937
|
41938
|
41939
|
41940
|
41941
|
41942
|
41943
|
44504
|
44505
|
44506
|
44507
|
44508
|
44509
|
44510