From 44fdf9fd60c42506c73a45b34d661dae668d6801 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 --- Koha/Acquisition/Order.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/Koha/Acquisition/Order.pm b/Koha/Acquisition/Order.pm index 89649a3..ff5143c 100644 --- a/Koha/Acquisition/Order.pm +++ b/Koha/Acquisition/Order.pm @@ -32,10 +32,10 @@ sub insert { unless $self->{$key}; } - if (not defined $self->{createdby}) { + if (not defined $self->{created_by}) { my $userenv = C4::Context->userenv; if ($userenv) { - $self->{createdby} = $userenv->{number}; + $self->{created_by} = $userenv->{number}; } } diff --git a/acqui/orderreceive.pl b/acqui/orderreceive.pl index 5dce2ec..6ccb74c 100755 --- a/acqui/orderreceive.pl +++ b/acqui/orderreceive.pl @@ -191,7 +191,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 363f4f8..7600fb6 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3051,7 +3051,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 `datecancellationprinted` date default NULL, -- the date the line item was deleted `cancellationreason` text default NULL, -- reason of cancellation `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 e459a1d..dd35d04 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -9736,9 +9736,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); } -- 1.9.1