From 4ea02e1d4c60a3395c0e924e7d123bc5d09f43e7 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 25 Jul 2014 10:48:57 -0400 Subject: [PATCH] Bug 12395 [QA Followup] * Rename createdby to created_by * Fix GPL versioning --- C4/Acquisition.pm | 4 ++-- acqui/orderreceive.pl | 2 +- acqui/showorder.pl | 4 ++-- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm index 42984e0..f63607b 100644 --- a/C4/Acquisition.pm +++ b/C4/Acquisition.pm @@ -1271,10 +1271,10 @@ sub NewOrder { croak "Mandatory parameter $key missing" unless $orderinfo->{$key}; } - if (not defined $orderinfo->{createdby}) { + if (not defined $orderinfo->{created_by}) { my $userenv = C4::Context->userenv; if ($userenv) { - $orderinfo->{createdby} = $userenv->{number}; + $orderinfo->{created_by} = $userenv->{number}; } } diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 5c22837..e309f08 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -190,7 +190,7 @@ if ( $bookseller->{listincgst} ) { my $suggestion = GetSuggestionInfoFromBiblionumber($order->{biblionumber}); -my $creator = GetMember( borrowernumber => $order->{createdby} ); +my $creator = GetMember( borrowernumber => $order->{created_by} ); my $budget = GetBudget( $order->{budget_id} ); diff --git a/acqui/showorder.pl b/acqui/showorder.pl index 048eb9f..2c92ea0 100755 --- a/acqui/showorder.pl +++ b/acqui/showorder.pl @@ -4,7 +4,7 @@ # # Koha is free software; you can redistribute it and/or modify it under the # terms of the GNU General Public License as published by the Free Software -# Foundation; either version 2 of the License, or (at your option) any later +# Foundation; either version 3 of the License, or (at your option) any later # version. # # Koha is distributed in the hope that it will be useful, but WITHOUT ANY @@ -34,7 +34,7 @@ my ( $template, $loggedinuser, $cookie ) = get_template_and_user({ my $ordernumber = $cgi->param('ordernumber'); my $order = GetOrder($ordernumber); -my $creator = GetMember(borrowernumber => $order->{createdby}); +my $creator = GetMember(borrowernumber => $order->{created_by}); $template->param( order => $order, diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 6c8b9cf..b256c4b 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3019,7 +3019,7 @@ CREATE TABLE `aqorders` ( -- information related to the basket line items `freight` decimal(28,6) default NULL, -- shipping costs (not used) `unitprice` decimal(28,6) default NULL, -- the actual cost entered when receiving this line item `quantityreceived` smallint(6) NOT NULL default 0, -- the quantity that have been received so far - createdby int(11) NULL DEFAULT NULL, -- the borrowernumber of order line's creator + created_by int(11) NULL DEFAULT NULL, -- the borrowernumber of order line's creator `cancelledby` varchar(10) default NULL, -- not used? always NULL `datecancellationprinted` date default NULL, -- the date the line item was deleted `order_internalnote` mediumtext, -- notes related to this order line, made for staff diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index b781aa4..8bc143f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -8709,9 +8709,9 @@ $DBversion = "XXX"; if ( CheckVersion($DBversion) ) { $dbh->do(q{ ALTER TABLE aqorders - ADD COLUMN createdby int(11) NULL DEFAULT NULL AFTER quantityreceived + ADD COLUMN created_by int(11) NULL DEFAULT NULL AFTER quantityreceived }); - print "Upgrade to $DBversion done (Bug 12395: Add aqorders.createdby column)\n"; + print "Upgrade to $DBversion done (Bug 12395: Add aqorders.created_by column)\n"; SetVersion ($DBversion); } -- 2.1.0