Bugzilla – Attachment 122884 Details for
Bug 17600
Standardize the EXPORT
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17600: Fix tests
Bug-17600-Fix-tests.patch (text/plain), 6.40 KB, created by
Jonathan Druart
on 2021-07-16 11:55:46 UTC
(
hide
)
Description:
Bug 17600: Fix tests
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-07-16 11:55:46 UTC
Size:
6.40 KB
patch
obsolete
>From f5bf73f72262844a840f6d11c96cfde08a8471a8 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 16 Jul 2021 09:46:59 +0200 >Subject: [PATCH] Bug 17600: Fix tests > >No idea why UpdateStats in C4::Circulation needs the fully qualified >namespace! > >I kept getting >Undefined subroutine &C4::Circulation::UpdateStats called at /kohadevbox/koha/C4/Circulation.pm line 1643. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > C4/Circulation.pm | 8 ++++---- > C4/Stats.pm | 7 +++---- > acqui/addorderiso2709.pl | 4 ++-- > acqui/edimsg.pl | 2 +- > acqui/parcel.pl | 2 +- > misc/translator/VerboseWarnings.pm | 12 ++++++------ > misc/translator/tmpl_process3.pl | 2 +- > 7 files changed, 18 insertions(+), 19 deletions(-) > >diff --git a/C4/Circulation.pm b/C4/Circulation.pm >index 05492309640..10e17c045d7 100644 >--- a/C4/Circulation.pm >+++ b/C4/Circulation.pm >@@ -790,7 +790,7 @@ sub CanBookBeIssued { > # > if ( $patron->category->category_type eq 'X' && ( $item_object->barcode )) { > # stats only borrower -- add entry to statistics table, and return issuingimpossible{STATS} = 1 . >- &UpdateStats({ >+ C4::Stats::UpdateStats({ > branch => C4::Context->userenv->{'branch'}, > type => 'localuse', > itemnumber => $item_object->itemnumber, >@@ -1631,7 +1631,7 @@ sub AddIssue { > } > > # Record the fact that this book was issued. >- &UpdateStats( >+ C4::Stats::UpdateStats( > { > branch => C4::Context->userenv->{'branch'}, > type => ( $onsite_checkout ? 'onsite_checkout' : 'issue' ), >@@ -2229,7 +2229,7 @@ sub AddReturn { > } > > # Record the fact that this book was returned. >- UpdateStats({ >+ C4::Stats::UpdateStats({ > branch => $branch, > type => $stat_type, > itemnumber => $itemnumber, >@@ -3117,7 +3117,7 @@ sub AddRenewal { > } > > # Add the renewal to stats >- UpdateStats( >+ C4::Stats::UpdateStats( > { > branch => $item_object->renewal_branchcode({branch => $branch}), > type => 'renew', >diff --git a/C4/Stats.pm b/C4/Stats.pm >index 7d63f18aa98..1b883d2de18 100644 >--- a/C4/Stats.pm >+++ b/C4/Stats.pm >@@ -19,7 +19,6 @@ package C4::Stats; > # along with Koha; if not, see <http://www.gnu.org/licenses>. > > use Modern::Perl; >-require Exporter; > use Carp qw( croak ); > use C4::Context; > >@@ -27,11 +26,11 @@ use Koha::DateUtils qw( dt_from_string ); > use Koha::Statistics; > use Koha::PseudonymizedTransactions; > >-use vars qw(@ISA @EXPORT); >- >+our (@ISA, @EXPORT_OK); > BEGIN { >+ require Exporter; > @ISA = qw(Exporter); >- @EXPORT = qw( >+ @EXPORT_OK = qw( > UpdateStats > ); > } >diff --git a/acqui/addorderiso2709.pl b/acqui/addorderiso2709.pl >index 43abac8207d..404c3334bda 100755 >--- a/acqui/addorderiso2709.pl >+++ b/acqui/addorderiso2709.pl >@@ -30,7 +30,7 @@ use Encode; > use C4::Context; > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); >-use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches sub SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction ); >+use C4::ImportBatch qw( GetImportRecordsRange GetImportRecordMarc GetImportRecordMatches SetImportRecordStatus SetMatchedBiblionumber SetImportBatchStatus GetImportBatch GetImportBatchRangeDesc GetNumberOfNonZ3950ImportBatches GetImportBatchOverlayAction GetImportBatchNoMatchAction GetImportBatchItemAction ); > use C4::Matcher; > use C4::Search qw( FindDuplicate ); > use C4::Acquisition qw( populate_order_with_prices ); >@@ -41,7 +41,7 @@ use C4::Biblio qw( > GetMarcQuantity > TransformHtmlToXml > ); >-use C4::Items qw( PrepareItemrecordDisplay sub AddItemFromMarc ); >+use C4::Items qw( PrepareItemrecordDisplay AddItemFromMarc ); > use C4::Budgets qw( GetBudget GetBudgets GetBudgetHierarchy CanUserUseBudget GetBudgetByCode ); > use C4::Acquisition qw( populate_order_with_prices ); > use C4::Suggestions; # GetSuggestion >diff --git a/acqui/edimsg.pl b/acqui/edimsg.pl >index 8ac9b8039ef..05340d44813 100755 >--- a/acqui/edimsg.pl >+++ b/acqui/edimsg.pl >@@ -19,7 +19,7 @@ > use Modern::Perl; > > use CGI; >-use Koha::Databas; >+use Koha::Database; > use C4::Koha; > use C4::Auth qw( get_template_and_user ); > use C4::Output qw( output_html_with_http_headers ); >diff --git a/acqui/parcel.pl b/acqui/parcel.pl >index d00d9bdb1e5..06172690f68 100755 >--- a/acqui/parcel.pl >+++ b/acqui/parcel.pl >@@ -58,7 +58,7 @@ use Modern::Perl; > > use C4::Auth qw( get_template_and_user ); > use C4::Acquisition qw( CancelReceipt GetInvoice GetInvoiceDetails get_rounded_price ); >-use C4::Budgets qw( _round GetBudget GetBudgetByOrderNumber GetBudgetName ); >+use C4::Budgets qw( GetBudget GetBudgetByOrderNumber GetBudgetName ); > use CGI qw ( -utf8 ); > use C4::Output qw( output_html_with_http_headers ); > use C4::Suggestions qw( GetSuggestion GetSuggestionInfoFromBiblionumber GetSuggestionInfo ); >diff --git a/misc/translator/VerboseWarnings.pm b/misc/translator/VerboseWarnings.pm >index 5225f74cc94..e2ee42377b9 100644 >--- a/misc/translator/VerboseWarnings.pm >+++ b/misc/translator/VerboseWarnings.pm >@@ -22,12 +22,12 @@ BEGIN { > require Exporter; > @ISA = qw(Exporter); > @EXPORT_OK = qw( >- &pedantic_p >- &warn_additional >- &warn_normal >- &warn_pedantic >- &error_additional >- &error_normal >+ pedantic_p >+ warn_additional >+ warn_normal >+ warn_pedantic >+ error_additional >+ error_normal > ); > } > >diff --git a/misc/translator/tmpl_process3.pl b/misc/translator/tmpl_process3.pl >index 2a9643d2820..8d270829f67 100755 >--- a/misc/translator/tmpl_process3.pl >+++ b/misc/translator/tmpl_process3.pl >@@ -20,7 +20,7 @@ use File::Basename qw( fileparse ); > use Getopt::Long qw( GetOptions ); > use Locale::PO; > use TmplTokenizer; >-use VerboseWarnings qw( :warn :die ); >+use VerboseWarnings qw( pedantic_p warn_additional warn_normal warn_pedantic error_additional error_normal ); > > ############################################################################### > >-- >2.20.1
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 17600
:
57394
|
57950
|
57951
|
57952
|
57953
|
57954
|
61994
|
61995
|
61996
|
61997
|
61998
|
62209
|
62210
|
62211
|
62212
|
62213
|
62940
|
62941
|
62942
|
62943
|
62958
|
62959
|
64387
|
64388
|
64389
|
64390
|
64391
|
64392
|
64466
|
64467
|
64468
|
64469
|
64470
|
64471
|
64472
|
64473
|
64474
|
64475
|
64476
|
121309
|
121310
|
121311
|
121312
|
121313
|
121314
|
122360
|
122361
|
122362
|
122363
|
122364
|
122365
|
122869
| 122884 |
122945
|
123194
|
123195
|
123196
|
123200
|
123210
|
123281
|
123283
|
123284
|
123325
|
123417
|
123418
|
123419
|
123420
|
123565
|
124866
|
125059
|
125063
|
125064
|
125066
|
126640
|
127056
|
127918