Bug 42764: Fix spelling errors across the codebase
Correct genuine spelling errors identified by the codespell 2.4.x full scan after the KTD container OS upgrade. Changes are in comments, POD, strings, and template text across 55 files. "SAN Ouest Provence" (the French library co-operative and Koha sponsor) is preserved as a proper noun. Perl copyright lines receive an inline # codespell:ignore annotation; about.tt files (contributor attribution pages) are added to the Koha::Devel::Files codespell exception list so that future uses of "Provence" as a typo for "Province" are still caught in all other files. Notable user-visible fixes: - "submiting" -> "submitting" in authority and bibliographic merge screens - "deleteable" -> "deletable" in patron exception messages - "Acquistions" -> "Acquisitions" in reports dictionary Test plan: 1. Apply patches 2. In the staff interface, go to Cataloguing > Merge records and confirm the submit button reads "Submitting" (not "Submiting") 3. In the staff interface, go to Authorities > Merge and confirm the same correction 4. Attempt to delete a patron with outstanding issues and confirm the error message reads "deletable" (not "deleteable") 5. prove xt/author/codespell.t => All tests pass Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
7538ee5cf3
commit
04809de849
|
|
@ -312,7 +312,7 @@ Create some metadata for your koha instance (if you're in a single instance setu
|
|||
|
||||
=item 2.
|
||||
|
||||
Swap metadata with your Identidy Provider (IdP)
|
||||
Swap metadata with your Identify Provider (IdP)
|
||||
|
||||
=item 3.
|
||||
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ ADD_LAYOUTS:
|
|||
|
||||
This function returns an arrayref whose elements are hashes containing all profiles upon success and 1 upon failure. Errors are logged
|
||||
to the Apache log. Two parameters are accepted. The first limits the field(s) returned. This parameter should be string of comma separated
|
||||
fields. ie. "field_1, field_2, ...field_n" The second limits the records returned based on a string containing a valud SQL 'WHERE' filter.
|
||||
fields. ie. "field_1, field_2, ...field_n" The second limits the records returned based on a string containing a valid SQL 'WHERE' filter.
|
||||
|
||||
NOTE: Do not pass in the keyword 'WHERE.'
|
||||
|
||||
|
|
@ -320,7 +320,7 @@ sub get_all_image_names {
|
|||
|
||||
This function returns an arrayref whose elements are hashes containing the batch_ids of current batches along with the item count
|
||||
for each batch upon success and 1 upon failure. Item counts are stored under the key '_item_count' Errors are logged to the Apache log.
|
||||
One parameter is accepted which limits the records returned based on a string containing a valud SQL 'WHERE' filter.
|
||||
One parameter is accepted which limits the records returned based on a string containing a valid SQL 'WHERE' filter.
|
||||
|
||||
NOTE: Do not pass in the keyword 'WHERE.'
|
||||
|
||||
|
|
@ -352,7 +352,7 @@ sub get_batch_summary {
|
|||
|
||||
This function returns an arrayref whose elements are hashes containing the label_ids of current labels along with the item count
|
||||
for each label upon success and 1 upon failure. Item counts are stored under the key '_item_count' Errors are logged to the Apache log.
|
||||
One parameter is accepted which limits the records returned based on a string containing a valud SQL 'WHERE' filter.
|
||||
One parameter is accepted which limits the records returned based on a string containing a valid SQL 'WHERE' filter.
|
||||
|
||||
NOTE: Do not pass in the keyword 'WHERE.'
|
||||
|
||||
|
|
@ -405,7 +405,7 @@ sub get_label_summary {
|
|||
|
||||
This function returns an arrayref whose elements are hashes containing the label_ids of current cards along with the item count
|
||||
for each card upon success and 1 upon failure. Item counts are stored under the key '_item_count' Errors are logged to the Apache log.
|
||||
One parameter is accepted which limits the records returned based on a string containing a valud SQL 'WHERE' filter.
|
||||
One parameter is accepted which limits the records returned based on a string containing a valid SQL 'WHERE' filter.
|
||||
|
||||
NOTE: Do not pass in the keyword 'WHERE.'
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package C4::Reserves;
|
||||
|
||||
# Copyright 2000-2002 Katipo Communications
|
||||
# 2006 SAN Ouest Provence
|
||||
# 2006 SAN Ouest Provence # codespell:ignore
|
||||
# 2007-2010 BibLibre Paul POULAIN
|
||||
# 2011 Catalyst IT
|
||||
#
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ sub update_data {
|
|||
$i++;
|
||||
}
|
||||
}
|
||||
say "$i data insered or updated";
|
||||
say "$i data inserted or updated";
|
||||
}
|
||||
|
||||
=head2 get_report
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ sub search {
|
|||
my $start = $params->{start};
|
||||
my $length = $params->{length};
|
||||
|
||||
# If not logged in user, be carreful and set the borrowernumber to 0
|
||||
# If not logged in user, be careful and set the borrowernumber to 0
|
||||
# to prevent private lists lack
|
||||
my $loggedinuser = C4::Context->userenv->{'number'} || 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use base qw(Koha::Object);
|
|||
|
||||
=head1 NAME
|
||||
|
||||
Koha::ClassSortRule Koha Classfication Sorting Rule Object class
|
||||
Koha::ClassSortRule Koha Classification Sorting Rule Object class
|
||||
|
||||
=head1 API
|
||||
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ my $cache = Koha::Caches->get_instance();
|
|||
|
||||
=head1 NAME
|
||||
|
||||
Koha::ClassSource - Koha Classfication Source Object class
|
||||
Koha::ClassSource - Koha Classification Source Object class
|
||||
|
||||
=head1 API
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ use base qw(Koha::Object);
|
|||
|
||||
=head1 NAME
|
||||
|
||||
Koha::ClassSplitRule Koha Classfication Splitting Rule Object class
|
||||
Koha::ClassSplitRule Koha Classification Splitting Rule Object class
|
||||
|
||||
=head1 API
|
||||
|
||||
|
|
|
|||
|
|
@ -102,9 +102,15 @@ my $exceptions = {
|
|||
misc/cronjobs/rss
|
||||
)
|
||||
],
|
||||
codespell => [],
|
||||
core => [],
|
||||
nonce => [qw(t/lib/plugins/Koha/Plugin/TestValuebuilder/test_valuebuilder_popup.tt)],
|
||||
codespell => [
|
||||
qw(
|
||||
koha-tmpl/intranet-tmpl/prog/en/modules/about.tt
|
||||
t/mock_templates/intranet-tmpl/prog/en/modules/about.tt
|
||||
t/mock_templates/intranet-tmpl/prog/fr-CA/modules/about.tt
|
||||
)
|
||||
],
|
||||
core => [],
|
||||
nonce => [qw(t/lib/plugins/Koha/Plugin/TestValuebuilder/test_valuebuilder_popup.tt)],
|
||||
},
|
||||
yml => {
|
||||
core => [],
|
||||
|
|
|
|||
|
|
@ -1603,7 +1603,7 @@ Koha::EDI
|
|||
Returns 1 on success undef on error
|
||||
|
||||
Most usual cause of error is a line with no or incorrect budget codes
|
||||
which woild cause order creation to abort
|
||||
which would cause order creation to abort
|
||||
If other correct lines exist these are processed and the erroneous line os logged
|
||||
|
||||
=head2 title_level_class
|
||||
|
|
|
|||
|
|
@ -414,7 +414,7 @@ Edifact - Edifact message handler
|
|||
|
||||
=head2 service_string_advice
|
||||
|
||||
Examines the Service String Advice returns 1 if the default separartors are in use
|
||||
Examines the Service String Advice returns 1 if the default separators are in use
|
||||
undef otherwise
|
||||
|
||||
=head2 segmentize
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ sub interchange_header {
|
|||
$hdr .= $self->interchange_control_reference();
|
||||
$hdr .= $separator;
|
||||
|
||||
# Recipents reference password not usually used in edifact
|
||||
# Recipients reference password not usually used in edifact
|
||||
$hdr .= q{+ORDERS}; # application reference
|
||||
|
||||
#Edifact does not usually include the following
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use Exception::Class (
|
|||
},
|
||||
'Koha::Exceptions::Patron::FailedDeleteAnonymousPatron' => {
|
||||
isa => 'Koha::Exceptions::Patron',
|
||||
description => "Deleting patron failed, AnonymousPatron is not deleteable"
|
||||
description => "Deleting patron failed, AnonymousPatron is not deletable"
|
||||
},
|
||||
'Koha::Exceptions::Patron::FailedDeleteProtectedPatron' => {
|
||||
isa => 'Koha::Exceptions::Patron',
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ Koha::FrameworkPlugin - Facilitate use of plugins in MARC/items editor
|
|||
|
||||
This object support two code styles:
|
||||
- In the new style, the plugin returns a hashref with a builder and a
|
||||
launcher key pointing to two anynomous subroutines.
|
||||
launcher key pointing to two anonymous subroutines.
|
||||
- In the old style, the builder is subroutine plugin_javascript and the
|
||||
launcher is subroutine plugin. For each plugin the routines are
|
||||
redefined.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ Koha::Item::Templates - Koha Item Template Object set class
|
|||
|
||||
=head3 get_available
|
||||
|
||||
Returns a hashref with keys 'owned' and 'shared' pointing to Koha::Item::Templats objects
|
||||
Returns a hashref with keys 'owned' and 'shared' pointing to Koha::Item::Templates objects
|
||||
representing templates owned by the user or shared to the user respectivetly.
|
||||
|
||||
=cut
|
||||
|
|
|
|||
|
|
@ -374,7 +374,7 @@ sub empty {
|
|||
|
||||
Koha::Objects->reset();
|
||||
|
||||
resets iteration so the next call to next() will start agein
|
||||
resets iteration so the next call to next() will start again
|
||||
with the first object in a set.
|
||||
|
||||
=cut
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ sub delete {
|
|||
my $default = Koha::Patron::Restriction::Types->find( { is_default => 1 } )->code;
|
||||
|
||||
# We can't use Koha objects here because Koha::Patron::Debarments
|
||||
# is not a Koha object. So we'll do it old skool
|
||||
# is not a Koha object. So we'll do it old school
|
||||
my $rows = C4::Context->dbh->do(
|
||||
"UPDATE borrower_debarments SET type = ? WHERE type = ?",
|
||||
undef, ( $default, $self->code )
|
||||
|
|
|
|||
|
|
@ -594,7 +594,7 @@ LINE: while ( my $borrowerline = <$handle> ) {
|
|||
|
||||
my @csvcolumns = $self->prepare_columns({headerrow => $borrowerline, keycol => \%csvkeycol, errors => \@errors, });
|
||||
|
||||
Returns an array of all column key and populates a hash of colunm key positions.
|
||||
Returns an array of all column key and populates a hash of column key positions.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ SQL snippet for us in reports
|
|||
is_nullable: 1
|
||||
size: 6
|
||||
|
||||
Koha module this definition is for Circulation, Catalog, Patrons, Acquistions, Accounts)
|
||||
Koha module this definition is for Circulation, Catalog, Patrons, Acquisitions, Accounts)
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
|
|
@ -609,7 +609,7 @@ our $koha_to_index_name = {
|
|||
};
|
||||
|
||||
# Note that sears and aat map to 008/11 values here
|
||||
# but don't appear in C4/Headin/MARC21 thesaurus
|
||||
# but don't appear in C4/Heading/MARC21 thesaurus
|
||||
# because they don't have values in controlled field indicators
|
||||
# https://www.loc.gov/marc/authority/ad008.html
|
||||
our $thesaurus_to_value = {
|
||||
|
|
|
|||
|
|
@ -176,7 +176,7 @@ if ( $op eq "" ) {
|
|||
#import selected lines
|
||||
$template->param( 'basketno' => $cgiparams->{'basketno'} );
|
||||
|
||||
# Budget_id is mandatory for adding an order, we just add a default, the user needs to modify this aftewards
|
||||
# Budget_id is mandatory for adding an order, we just add a default, the user needs to modify this afterwards
|
||||
my $budgets = GetBudgets();
|
||||
if ( scalar @$budgets == 0 ) {
|
||||
die "No budgets defined, can't continue";
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Copyright 2008 BibLibre, BibLibre, Paul POULAIN
|
||||
# SAN Ouest Provence
|
||||
# SAN Ouest Provence # codespell:ignore
|
||||
#
|
||||
# This file is part of Koha.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ else {
|
|||
|
||||
# FIXME - we really need a better way to do this consistently
|
||||
# and across the board, be it bigints, Math::FixedPoint, a
|
||||
# modernized version of Math::Curency that isn't tied to the system
|
||||
# modernized version of Math::Currency that isn't tied to the system
|
||||
# locale, or something else.
|
||||
$total = sprintf( "%.2f", $total );
|
||||
$sub_unalloc = sprintf( "%.2f", $sub_unalloc );
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ use C4::Auth qw( get_template_and_user );
|
|||
use C4::Output qw( output_html_with_http_headers );
|
||||
|
||||
# Example of framework plugin new style.
|
||||
# It should define and return at least one and normally two anynomous
|
||||
# It should define and return at least one and normally two anonymous
|
||||
# subroutines in a hash ref.
|
||||
# REQUEST: If you copy this code to construct a new plugin, please REMOVE
|
||||
# all comments copied from this file.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use Koha::Installer::Output qw(say_warning say_success say_info);
|
|||
return {
|
||||
bug_number => "33363",
|
||||
description =>
|
||||
"Split suggestions_manage into three separate permissions for creating, updating, and deleting suggetions",
|
||||
"Split suggestions_manage into three separate permissions for creating, updating, and deleting suggestions",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ( $dbh, $out ) = @$args{qw(dbh out)};
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@
|
|||
[% Asset.js("js/authorities.js") | $raw %]
|
||||
[% Asset.js("js/merge-record.js") | $raw %]
|
||||
<script nonce="[% Koha.CSPNonce | $raw %]">
|
||||
// When submiting the form
|
||||
// When submitting the form
|
||||
function mergeformsubmit() {
|
||||
$('#tabs').remove();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,7 +286,7 @@
|
|||
return missing;
|
||||
}
|
||||
|
||||
// When submiting the form
|
||||
// When submitting the form
|
||||
function mergeformsubmit() {
|
||||
var missing = check_mandatory();
|
||||
var alert_msg = '';
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ KOHA.browser = function (searchid, biblionumber) {
|
|||
var me = this;
|
||||
|
||||
if (!searchid) {
|
||||
// We are generating a clean numeric datetime representation so we can easily compare them using the default javascript lexigraphic sorter.
|
||||
// We are generating a clean numeric datetime representation so we can easily compare them using the default javascript lexicographic sorter.
|
||||
searchid = "scs_" + new Date().getTime(); // scs for Staff Client Search
|
||||
}
|
||||
me.searchid = searchid;
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import {
|
|||
* @param {Boolean} resourceConfig.table.addAdditionalFilters - A flag to indicate whether to add filters to the list component for the datatable.
|
||||
* @param {Object} resourceConfig.table.filters - The table filters for the resource. Follows the format for the resourceAttrs parameter.
|
||||
* @param {Function} resourceConfig.afterResourceFetch - A function to call after the resource is fetched. This can be used to edit resource data or fetch additional data
|
||||
* @param {Boolean} resourceConfig.embedded - A flag to indicate whether the resource is actually being used as a child component of another resource e.g. embedding a list of agreeements into EBSCO package agreements
|
||||
* @param {Boolean} resourceConfig.embedded - A flag to indicate whether the resource is actually being used as a child component of another resource e.g. embedding a list of agreements into EBSCO package agreements
|
||||
* @param {String} resourceConfig.extendedAttributesResourceType - The resource type for extended attributes, if applicable.
|
||||
* @param {String} resourceConfig.extendedAttributesFieldGroup - The field group that you would like the additional fields to be displayed in.
|
||||
* @param {Function} resourceConfig.defaultToolbarButtons - A function to amend default buttons in the toolbar.
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
var flatpickr_timeformat_string = [% IF Koha.Preference('TimeFormat') == '12hr' %]"G:i K"[% ELSE %]"H:i"[% END %];
|
||||
var flatpickr_timeformat = [% IF Koha.Preference('TimeFormat') == '12hr' %]false[% ELSE %]true[% END %];
|
||||
var flatpickr_dateformat_string = "";
|
||||
var delimter = "";
|
||||
var delimiter = "";
|
||||
var altinput_dateformat = "";
|
||||
switch ( dateformat_pref ){
|
||||
case "us":
|
||||
|
|
|
|||
|
|
@ -241,13 +241,13 @@ This script is intended to be called as a cgi script although it could be easily
|
|||
parameters and two "multiple" parameters as follows:
|
||||
|
||||
C<batch_id> A single valid batch id to export.
|
||||
C<template_id> A single valid template id to be applied to the current export. This parameter is manditory.
|
||||
C<layout_id> A single valid layout id to be applied to the current export. This parameter is manditory.
|
||||
C<template_id> A single valid template id to be applied to the current export. This parameter is mandatory.
|
||||
C<layout_id> A single valid layout id to be applied to the current export. This parameter is mandatory.
|
||||
C<start_label> The number of the label on which to begin the export. This parameter is optional.
|
||||
C<lable_ids> A single valid label id to export. Multiple label ids may be submitted to export multiple labels.
|
||||
C<item_numbers> A single valid item number to export. Multiple item numbers may be submitted to export multiple items.
|
||||
|
||||
B<NOTE:> One of the C<batch_id>, C<label_ids>, or C<item_number> parameters is manditory. However, do not pass a combination of them or bad things might result.
|
||||
B<NOTE:> One of the C<batch_id>, C<label_ids>, or C<item_number> parameters is mandatory. However, do not pass a combination of them or bad things might result.
|
||||
|
||||
example:
|
||||
http://staff-client.kohadev.org/cgi-bin/koha/labels/label-create-pdf.pl?batch_id=1&template_id=1&layout_id=5&start_label=1
|
||||
|
|
|
|||
|
|
@ -86,7 +86,7 @@ if ( $op eq 'cud-delete' ) {
|
|||
if ( $number_type eq "itemnumber" && Koha::Items->find($number) ) {
|
||||
push @item_numbers, $number;
|
||||
} elsif ( $number_type eq "barcode" )
|
||||
{ # we must test in case an invalid barcode is passed in; we effectively disgard them atm
|
||||
{ # we must test in case an invalid barcode is passed in; we effectively discard them atm
|
||||
$number = barcodedecode($number);
|
||||
my $item = Koha::Items->find( { barcode => $number } );
|
||||
push @item_numbers, $item->itemnumber if $item;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Copyright 2006 SAN OUEST PROVENCE et Paul POULAIN
|
||||
# Copyright 2006 SAN OUEST PROVENCE et Paul POULAIN # codespell:ignore
|
||||
# Copyright 2010 BibLibre
|
||||
#
|
||||
# This file is part of Koha.
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ my $r = merge( @$precedent_state, @$total_issues_today
|
|||
add_actual_state($r);
|
||||
my ( $total, $datas ) = build_array($r);
|
||||
|
||||
# Gettings sums
|
||||
# Getting sums
|
||||
my $count_total_precedent_state = $total->{count_precedent_state} || 0;
|
||||
my $count_total_issues = $total->{count_total_issues_today} || 0;
|
||||
my $count_total_issues_returned = $total->{count_total_issues_returned_today} || 0;
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ if (@skip_branches) {
|
|||
}
|
||||
%branches_to_process = map { $_ => 1 } @available_branches;
|
||||
|
||||
# The mapped 0 values here will overwrite the corrosponding mapped 1 values
|
||||
# The mapped 0 values here will overwrite the corresponding mapped 1 values
|
||||
# where the 0 values exist
|
||||
%branches_to_process = ( %branches_to_process, map { $_ => 0 } @skip_branches );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ $0: establish relationship to host items
|
|||
|
||||
Based on barcode in host field populates subfield 0 with host biblionumber and subfield 9 with host itemnumber.
|
||||
|
||||
Subfield 0 and 9 are used in Koha screns to display relationships between analytical records and host bibs and items.
|
||||
Subfield 0 and 9 are used in Koha screens to display relationships between analytical records and host bibs and items.
|
||||
|
||||
NOT usable with UNIMARC data. You can use it only if you have tag 461 with also an items id (like barcode or item numbers). In UNIMARC this situation is very rare. If you have data coded in this way, send a mail to koha-dev mailing list and ask for the feature.
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ my @services = (
|
|||
# 'HarvestExpandedRecords', # OAI-PMH
|
||||
'GetAvailability', # FIXME Add bibliographic level
|
||||
|
||||
# 'GoToBibliographicRequestPage' # I don't understant this one
|
||||
# 'GoToBibliographicRequestPage' # I don't understand this one
|
||||
# Level 2: Elementary OPAC supplement
|
||||
# 'HarvestAuthorityRecords', # OAI-PMH
|
||||
# 'HarvestHoldingsRecords', # OAI-PMH
|
||||
|
|
@ -60,8 +60,8 @@ my @services = (
|
|||
# 'Scan', # TODO
|
||||
'GetAuthorityRecords',
|
||||
|
||||
# 'OutputRewritablePage', # I don't understant this one
|
||||
# 'OutputIntermediateFormat', # I don't understant this one
|
||||
# 'OutputRewritablePage', # I don't understand this one
|
||||
# 'OutputIntermediateFormat', # I don't understand this one
|
||||
# Level 3: Elementary OPAC alternative
|
||||
'LookupPatron',
|
||||
'AuthenticatePatron',
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ if ( $reserve_id && $borrowernumber ) {
|
|||
|
||||
unless ( $hold && $hold->borrowernumber == $borrowernumber ) {
|
||||
|
||||
# whatcha tryin to do?
|
||||
# whatcha trying to do?
|
||||
print $query->redirect('/cgi-bin/koha/errors/403.pl');
|
||||
exit;
|
||||
}
|
||||
|
|
@ -62,7 +62,7 @@ if ( $reserve_id && $borrowernumber ) {
|
|||
$hold->set_pickup_location( { library_id => $new_pickup_location } );
|
||||
} else {
|
||||
|
||||
# whatcha tryin to do?
|
||||
# whatcha trying to do?
|
||||
print $query->redirect('/cgi-bin/koha/errors/403.pl');
|
||||
exit;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Copyright 2008 Garry Collum and the Koha Development team
|
||||
# Copyright 2008 Garry Column and the Koha Development team
|
||||
# Copyright 2010 BibLibre
|
||||
# Copyright 2011 KohaAloha, NZ
|
||||
#
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ if ( $op eq 'cud-remove' ) {
|
|||
foreach my $number (@bor_nums_unchecked) {
|
||||
$number =~ s/\r$//; # strip any naughty return chars
|
||||
if ( Koha::Patrons->find($number) )
|
||||
{ # we must test in case an invalid borrowernumber is passed in; we effectively disgard them atm
|
||||
{ # we must test in case an invalid borrowernumber is passed in; we effectively discard them atm
|
||||
my $borrower_number = $number;
|
||||
push @borrower_numbers, $borrower_number;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,15 +59,15 @@ subtest "pagination_bar tests" => sub {
|
|||
);
|
||||
is(
|
||||
$previous_page_offset, 140,
|
||||
"Previous page is current offset minus reults per page"
|
||||
"Previous page is current offset minus results per page"
|
||||
);
|
||||
is(
|
||||
$next_page_offset, 180,
|
||||
"Next page is current offset plus reults per page"
|
||||
"Next page is current offset plus results per page"
|
||||
);
|
||||
is(
|
||||
$last_page_offset, 480,
|
||||
"Last page is pages minus 1 times reults per page"
|
||||
"Last page is pages minus 1 times results per page"
|
||||
);
|
||||
is( @$PAGE_NUMBERS, 10, "If on first ten pages we only show 10 pages" );
|
||||
|
||||
|
|
@ -95,15 +95,15 @@ subtest "pagination_bar tests" => sub {
|
|||
);
|
||||
is(
|
||||
$previous_page_offset, 220,
|
||||
"Previous page is current offset minus reults per page"
|
||||
"Previous page is current offset minus results per page"
|
||||
);
|
||||
is(
|
||||
$next_page_offset, 260,
|
||||
"Next page is current offset plus reults per page"
|
||||
"Next page is current offset plus results per page"
|
||||
);
|
||||
is(
|
||||
$last_page_offset, 460,
|
||||
"Last page is pages minus 1 times reults per page"
|
||||
"Last page is pages minus 1 times results per page"
|
||||
);
|
||||
is( @$PAGE_NUMBERS, 20, "If past first ten pages we show 20 pages" );
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const generateMockData = (type, properties) => {
|
|||
switch (type) {
|
||||
case "string":
|
||||
if (properties?.maxLength) {
|
||||
// The propability to have a string with length=1 is the same as length=10
|
||||
// The probability to have a string with length=1 is the same as length=10
|
||||
// We have very limited pool of possible values for length=1 which will result in a "Duplicate ID" error from the server
|
||||
// Setting minLength to 3 to prevent this kind of failures
|
||||
let minLength =
|
||||
|
|
|
|||
|
|
@ -396,7 +396,7 @@ subtest 'Record fields has been added and deleted when add = 1, append = 0, remo
|
|||
}
|
||||
)->store();
|
||||
|
||||
# Warning - is there a use case in real-life for this combinaison?
|
||||
# Warning - is there a use case in real-life for this combination?
|
||||
my $expected_record = build_record(
|
||||
[
|
||||
# "250" field have retained their original value
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ $date = C4::Circulation::CalcDateDue( $start_date, $itemtype,
|
|||
$dayweek_issue_expected = $start_date->add( days => $issue_should_add );
|
||||
is(
|
||||
$date, $expected_rolled_date->strftime('%F') . 'T23:59:00',
|
||||
"useDaysMode = Dayweek, closed on due date and two subequent due dates, 14 day loan (should trigger 2 x 7 day roll forward), issue date expiry ( start + 28 )"
|
||||
"useDaysMode = Dayweek, closed on due date and two subsequent due dates, 14 day loan (should trigger 2 x 7 day roll forward), issue date expiry ( start + 28 )"
|
||||
);
|
||||
|
||||
# ...and for renewals...
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ subtest "_search tests" => sub {
|
|||
'When thesaurus in subfield 2, and nothing is found, we search again for notdefined (008_11 = z), and get no results because 040 $f with different value exists in the auth rec.'
|
||||
);
|
||||
|
||||
# When LinkerConsiderThesaurus off, no attantion is being paid on the thesaurus
|
||||
# When LinkerConsiderThesaurus off, no attention is being paid on the thesaurus
|
||||
t::lib::Mocks::mock_preference( 'LinkerConsiderThesaurus', '0' );
|
||||
|
||||
($matched_auths) = $heading->_search('match-heading');
|
||||
|
|
|
|||
|
|
@ -312,7 +312,7 @@ subtest 'record_source() and source_allows_editing() tests' => sub {
|
|||
my $biblio = $builder->build_sample_biblio;
|
||||
|
||||
my $metadata = $biblio->metadata;
|
||||
is( $metadata->record_source_id, undef, 'No record source defined for metatada object' );
|
||||
is( $metadata->record_source_id, undef, 'No record source defined for metadata object' );
|
||||
ok( $metadata->source_allows_editing, 'No record source, can be edited' );
|
||||
is( $metadata->record_source, undef );
|
||||
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ subtest 'automatic_checkin' => sub {
|
|||
}
|
||||
)->store;
|
||||
|
||||
# due checkout for nomal itemtype
|
||||
# due checkout for normal itemtype
|
||||
my $checkout_ni = Koha::Checkout->new(
|
||||
{
|
||||
borrowernumber => $patron->borrowernumber,
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ my $new_cs_2 = Koha::ClassSource->new(
|
|||
)->store;
|
||||
|
||||
is( $new_cs_1->cn_source, 'source_1', 'Adding a new classification should have set the cn_source' );
|
||||
is( Koha::ClassSources->search->count, $nb_of_class_sources + 2, 'The 2 classifcations should have been added' );
|
||||
is( Koha::ClassSources->search->count, $nb_of_class_sources + 2, 'The 2 classifications should have been added' );
|
||||
|
||||
my $retrieved_cs_1 = Koha::ClassSources->find( $new_cs_1->cn_source );
|
||||
is(
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ subtest 'replace' => sub {
|
|||
my $updated_record = MARC::Record->new_from_xml( $koha_auth->marcxml, 'UTF-8' );
|
||||
is(
|
||||
$updated_record->field('100')->as_string, $auth_record->field('100')->as_string,
|
||||
"The Koha auhtority record is correctly updated"
|
||||
"The Koha authority record is correctly updated"
|
||||
);
|
||||
is( $import_record->marcxml_old, $koha_xml, "The old marcxml in import record is correctly updated" );
|
||||
|
||||
|
|
|
|||
|
|
@ -2402,7 +2402,7 @@ subtest 'update privacy tests' => sub {
|
|||
$patron->discard_changes;
|
||||
|
||||
is( $old_checkout->borrowernumber, $patron->id, "When anonymizing fails, we don't clear the checkouts" );
|
||||
is( $patron->privacy(), 1, "When anonymizing fails, we don't chaneg the privacy" );
|
||||
is( $patron->privacy(), 1, "When anonymizing fails, we don't change the privacy" );
|
||||
|
||||
my $anon_patron = $builder->build_object( { class => 'Koha::Patrons' } );
|
||||
t::lib::Mocks::mock_preference( 'AnonymousPatron', $anon_patron->id );
|
||||
|
|
|
|||
|
|
@ -3337,7 +3337,7 @@ subtest 'queue_notice' => sub {
|
|||
is_deeply(
|
||||
$patron->queue_notice( { letter_params => $letter_params, message_transports => \@mtts } ),
|
||||
{ sent => ['print'], fallback => [ 'email', 'sms' ] },
|
||||
"Email fallsback to print if no emai, sms fallsback to print if no sms, only one print sent"
|
||||
"Email fallsback to print if no email, sms fallsback to print if no sms, only one print sent"
|
||||
);
|
||||
is(
|
||||
Koha::Notice::Messages->search( { borrowernumber => $patron->borrowernumber } )->count, $counter + 1,
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ subtest 'InstallPlugins() tests' => sub {
|
|||
}
|
||||
'Koha::Exceptions::BadParameter';
|
||||
|
||||
# Tests when the plugin to be installled is not found
|
||||
# Tests when the plugin to be installed is not found
|
||||
throws_ok {
|
||||
$plugins->InstallPlugins( { include => ["Koha::Plugin::NotfoundPlugin"] } );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/perl
|
||||
|
||||
# Unit tests for Koha::Misc::Files
|
||||
# Author: Jacek Ablewicz, abl@biblos.pk.edu.pl
|
||||
# Author: Jacek Ablewicz, able@biblos.pk.edu.pl
|
||||
|
||||
use Modern::Perl;
|
||||
use C4::Context;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,7 @@ subtest '_get_match_keys() tests' => sub {
|
|||
),
|
||||
MARC::Field->new(
|
||||
'245', ' ', ' ',
|
||||
a => ' .; thE t[]:,aliS(m)/An\'"',
|
||||
a => ' .; thE t[]:,alias(m)/An\'"',
|
||||
c => 'Stephen King, Peter Straub.'
|
||||
),
|
||||
MARC::Field->new(
|
||||
|
|
@ -119,7 +119,7 @@ subtest '_get_match_keys() tests' => sub {
|
|||
my @keys = C4::Matcher::_get_match_keys( $record, $matchpoint );
|
||||
|
||||
is(
|
||||
$keys[0], 'THE TALISMAN STEPHEN KING PETER STRAUB',
|
||||
$keys[0], 'THE TALIASMAN STEPHEN KING PETER STRAUB',
|
||||
'Match key correctly calculated with no $norms'
|
||||
);
|
||||
|
||||
|
|
@ -223,7 +223,7 @@ subtest '_get_match_keys() tests' => sub {
|
|||
);
|
||||
@keys = C4::Matcher::_get_match_keys( $record, $matchpoint );
|
||||
is(
|
||||
$keys[0], ' .; thE t[]:,aliS(m)/An\'" Stephen King, Peter Straub.',
|
||||
$keys[0], ' .; thE t[]:,alias(m)/An\'" Stephen King, Peter Straub.',
|
||||
'Match key intact if \'none\' specified, length 0 and offset 0'
|
||||
);
|
||||
|
||||
|
|
@ -292,7 +292,7 @@ subtest '_get_match_keys() tests' => sub {
|
|||
'Passing an invalid normalization routine name raises a warning';
|
||||
|
||||
is(
|
||||
$keys[0], ' .; thE t[]:,aliS(m)/An\'" Stephen King, Peter Straub.',
|
||||
$keys[0], ' .; thE t[]:,alias(m)/An\'" Stephen King, Peter Straub.',
|
||||
'Match key intact if invalid normalization routine specified'
|
||||
);
|
||||
|
||||
|
|
@ -308,7 +308,7 @@ subtest '_get_match_keys() tests' => sub {
|
|||
'Passing an invalid normalization routine name raises a warning';
|
||||
|
||||
is(
|
||||
$keys[0], ' .; THE T[]:,ALIS(M)/AN\'" STEPHEN KING, PETER STRAUB.',
|
||||
$keys[0], ' .; THE T[]:,ALIAS(M)/AN\'" STEPHEN KING, PETER STRAUB.',
|
||||
'Match key correctly normalized if invalid normalization routine specified'
|
||||
);
|
||||
|
||||
|
|
@ -342,7 +342,7 @@ subtest '_get_match_keys() tests' => sub {
|
|||
delete $matchpoint->{component}->{subfields};
|
||||
@keys = C4::Matcher::_get_match_keys( $record, $matchpoint );
|
||||
is(
|
||||
$keys[0], ' .; thE t[]:,aliS(m)/An\'" Stephen King, Peter Straub.',
|
||||
$keys[0], ' .; thE t[]:,alias(m)/An\'" Stephen King, Peter Straub.',
|
||||
"Match key correctly returns whole field if no subfields specified"
|
||||
);
|
||||
};
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ subtest 'BuildReport() tests' => sub {
|
|||
is( $report->{volumetry}->{old_reserves}, Koha::Old::Holds->count, "Old holds count correct" );
|
||||
is( $report->{volumetry}->{borrowers}, Koha::Patrons->count, "Patrons count correct" );
|
||||
is( $report->{volumetry}->{aqorders}, Koha::Acquisition::Orders->count, "Orders count correct" );
|
||||
is( $report->{volumetry}->{subscription}, Koha::Subscriptions->count, "Suscriptions count correct" );
|
||||
is( $report->{volumetry}->{subscription}, Koha::Subscriptions->count, "Subscriptions count correct" );
|
||||
|
||||
$schema->storage->txn_rollback;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue