diff --git a/C4/Auth.pm b/C4/Auth.pm
index 42baea8321..7bd2b7bfd0 100644
--- a/C4/Auth.pm
+++ b/C4/Auth.pm
@@ -1199,10 +1199,10 @@ sub checkauth {
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search->as_list };
if ( C4::Context->preference('AutoLocation') ) {
# we have to check they are coming from the right ip range
- my $domain = $branches->{$branchcode}->{'branchip'};
+ my $domain = $branches->{$branchcode}->{'branchip'} // q{};
$domain =~ s|\.\*||g;
$domain =~ s/\s+//g;
- if ( $ip !~ /^$domain/ ) {
+ if ( $domain && $ip !~ /^$domain/ ) {
$cookie = $cookie_mgr->replace_in_list( $cookie, $query->cookie(
-name => 'CGISESSID',
-value => '',
diff --git a/C4/Letters.pm b/C4/Letters.pm
index ecfadfbb32..c46ff0769a 100644
--- a/C4/Letters.pm
+++ b/C4/Letters.pm
@@ -541,24 +541,30 @@ sub SendAlerts {
=head2 GetPreparedLetter( %params )
- %params hash:
- module => letter module, mandatory
- letter_code => letter code, mandatory
- branchcode => for letter selection, if missing default system letter taken
- tables => a hashref with table names as keys. Values are either:
- - a scalar - primary key value
- - an arrayref - primary key values
- - a hashref - full record
- substitute => custom substitution key/value pairs
- repeat => records to be substituted on consecutive lines:
- - an arrayref - tries to guess what needs substituting by
- taking remaining << >> tokensr; not recommended
- - a hashref token => @tables - replaces << >> << >>
- subtemplate for each @tables row; table is a hashref as above
- want_librarian => boolean, if set to true triggers librarian details
- substitution from the userenv
- Return value:
- letter fields hashref (title & content useful)
+ my $letter = GetPreparedLetter(
+ {
+ module => "letter module", # mandatory
+ letter_code => "letter code", # mandatory
+ branchcode => "for letter selection", # if missing default system letter taken
+ objects => {}, # a hashref with object names as keys and objects as values
+ tables => {}, # a hashref with table names as keys. Values are either:
+ # - a scalar - primary key value
+ # - an arrayref - primary key values
+ # - a hashref - full record
+ substitute => {}, # custom substitution key/value pairs
+ repeat => '', # records to be substituted on consecutive lines, accepts either:
+ # - an arrayref
+ # tries to guess what needs substituting by taking remaining
+ # << >> tokensr; not recommended
+ # - a hashref token => @tables
+ # replaces << >> << >> subtemplate for each
+ # @tables row; table is a hashref as above
+ want_librarian => '' # boolean, if set to true triggers librarian details substitution
+ # from the userenv
+ }
+ );
+
+Return value: letter fields hashref (title & content useful)
=cut
diff --git a/Koha/REST/V1/Auth/Password.pm b/Koha/REST/V1/Auth/Password.pm
index 189dcc80d5..339229477d 100644
--- a/Koha/REST/V1/Auth/Password.pm
+++ b/Koha/REST/V1/Auth/Password.pm
@@ -73,7 +73,7 @@ sub validate {
return try {
my ( $status, $THE_cardnumber, $THE_userid, $patron ) = C4::Auth::checkpw( $identifier, $password );
unless ( $status && $status > 0 ) {
- my $error_response = $status == -2 ? 'Password expired' : 'Validation failed';
+ my $error_response = ($status && $status == -2) ? 'Password expired' : 'Validation failed';
return $c->render(
status => 400,
openapi => { error => $error_response }
diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
index 35ab4b7f91..0ab397b523 100644
--- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
+++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm
@@ -730,10 +730,11 @@ sub _convert_sort_fields {
# Convert the fields and orders, drop anything we don't know about.
grep { $_->{field} } map {
my ( $f, $d ) = /(.+)_(.+)/;
+ defined $f && defined $d ?
{
field => $sort_field_convert{$f},
direction => $sort_order_convert{$d}
- }
+ } : { field => undef };
} @sort_by;
}
diff --git a/acqui/acqui-home.pl b/acqui/acqui-home.pl
index 8e679727ad..07b1cce899 100755
--- a/acqui/acqui-home.pl
+++ b/acqui/acqui-home.pl
@@ -50,10 +50,10 @@ my $status = $query->param('status') || "ASKED";
# Get current branch count and total viewable count, if they don't match then pass
# both to template
if( C4::Context->only_my_library ){
- my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count();
+ my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'}, archived => 0 })->count();
$template->param( suggestions_count => $local_pendingsuggestions_count );
} else {
- my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" });
+ my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 });
my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count();
my $pendingsuggestions_count = $pendingsuggestions->count();
$template->param(
diff --git a/authorities/merge.pl b/authorities/merge.pl
index 0799c26b04..607f2c2665 100755
--- a/authorities/merge.pl
+++ b/authorities/merge.pl
@@ -156,30 +156,39 @@ else {
($recordObj1, $recordObj2) = ($recordObj2, $recordObj1);
}
+ # Getting frameworktext
+ my $frameworktext1 = Koha::Authority::Types->find( $recordObj1->authtypecode );
+ my $frameworktext2 = Koha::Authority::Types->find( $recordObj2->authtypecode );
+ my $frameworktextdestination = Koha::Authority::Types->find($framework);
+
# Creating a loop for display
my @records = (
{
- recordid => $mergereference,
- record => $recordObj1->record,
+ recordid => $mergereference,
+ record => $recordObj1->record,
frameworkcode => $recordObj1->authtypecode,
- display => $recordObj1->createMergeHash($tagslib),
- reference => 1,
+ frameworktext => $frameworktext1->authtypetext,
+ display => $recordObj1->createMergeHash($tagslib),
+ reference => 1,
},
{
- recordid => $notreference,
- record => $recordObj2->record,
+ recordid => $notreference,
+ record => $recordObj2->record,
frameworkcode => $recordObj2->authtypecode,
- display => $recordObj2->createMergeHash($tagslib),
+ frameworktext => $frameworktext2->authtypetext,
+ display => $recordObj2->createMergeHash($tagslib),
},
);
# Parameters
$template->param(
- recordid1 => $mergereference,
- recordid2 => $notreference,
- records => \@records,
- framework => $framework,
+ recordid1 => $mergereference,
+ recordid2 => $notreference,
+ records => \@records,
+ framework => $framework,
+ frameworktext => $frameworktextdestination->authtypetext,
+ multipleauthtypes => ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) ? 1 : 0,
);
}
else {
@@ -194,10 +203,14 @@ else {
);
if ( $recordObj1->authtypecode ne $recordObj2->authtypecode ) {
my $authority_types = Koha::Authority::Types->search( { authtypecode => { '!=' => '' } }, { order_by => ['authtypetext'] } );
+ my $frameworktext1 = Koha::Authority::Types->find( $recordObj1->authtypecode );
+ my $frameworktext2 = Koha::Authority::Types->find( $recordObj2->authtypecode );
$template->param(
frameworkselect => $authority_types->unblessed,
frameworkcode1 => $recordObj1->authtypecode,
frameworkcode2 => $recordObj2->authtypecode,
+ frameworklabel1 => $frameworktext1->authtypetext,
+ frameworklabel2 => $frameworktext2->authtypetext,
);
}
}
diff --git a/catalogue/itemsearch.pl b/catalogue/itemsearch.pl
index 7f58423602..b56f509513 100755
--- a/catalogue/itemsearch.pl
+++ b/catalogue/itemsearch.pl
@@ -51,7 +51,7 @@ if (defined $format and $format eq 'json') {
my @f = $cgi->multi_param('f');
my @q = $cgi->multi_param('q');
- # If index indicates the value is a barcode, we need to preproccess it before searching
+ # If index indicates the value is a barcode, we need to preprocess it before searching
for ( my $i = 0; $i < @q; $i++ ) {
$q[$i] = barcodedecode($q[$i]) if $f[$i] eq 'barcode';
}
@@ -141,10 +141,11 @@ if ( defined $format ) {
}
}
- my @c = $cgi->multi_param('c');
- my @fields = $cgi->multi_param('f');
- my @q = $cgi->multi_param('q');
- my @op = $cgi->multi_param('op');
+ my %param_names = map { $_ => 1 } $cgi->multi_param;
+ my @c = $param_names{'c[]'} ? $cgi->multi_param('c[]') : $cgi->multi_param('c');
+ my @fields = $param_names{'f[]'} ? $cgi->multi_param('f[]') : $cgi->multi_param('f');
+ my @q = $param_names{'q[]'} ? $cgi->multi_param('q[]') : $cgi->multi_param('q');
+ my @op = $param_names{'op[]'} ? $cgi->multi_param('op[]') : $cgi->multi_param('op');
my $f;
for (my $i = 0; $i < @fields; $i++) {
diff --git a/catalogue/search.pl b/catalogue/search.pl
index b5ae390657..462542d070 100755
--- a/catalogue/search.pl
+++ b/catalogue/search.pl
@@ -459,7 +459,7 @@ my $builder = Koha::SearchEngine::QueryBuilder->new(
my $searcher = Koha::SearchEngine::Search->new(
{ index => $Koha::SearchEngine::BIBLIOS_INDEX } );
-# If index indicates the value is a barocode, we need to preproccess it before searching
+# If index indicates the value is a barcode, we need to preprocess it before searching
for ( my $i = 0; $i < @operands; $i++ ) {
$operands[$i] = barcodedecode($operands[$i]) if (defined($indexes[$i]) && $indexes[$i] eq 'bc');
}
diff --git a/docs/teams.yaml b/docs/teams.yaml
index 419767a30d..a30dcd0782 100644
--- a/docs/teams.yaml
+++ b/docs/teams.yaml
@@ -1286,7 +1286,7 @@ team:
newsletter:
name: Michael Kuhn
24.05:
- release_date: 1716336000
+ release_date: 1716850801
manager:
name: Katrin Fischer
manager_assistants:
@@ -1368,3 +1368,80 @@ team:
- name: Liz Rea
newsletter:
name: Michael Kuhn
+ 24.11:
+ release_date: 1732233601
+ manager:
+ name: Katrin Fischer
+ manager_assistants:
+ - name: Tomás Cohen Arazi
+ - name: Martin Renvoize
+ - name: Jonathan Druart
+ maintainer:
+ - version: 24.05
+ name: Lucas Gass
+ - version: 23.11
+ name: Fridolin Somers
+ - version: 23.05
+ name: Wainui Witika-Park
+ - version: 22.11
+ name: Frédéric Demians
+ qa_manager:
+ name: Martin Renvoize
+ qa:
+ - name: Marcel de Rooy
+ - name: Kyle M Hall
+ - name: Emily Lamancusa
+ - name: Nick Clemens
+ - name: Lucas Gass
+ - name: Tomás Cohen Arazi
+ - name: Julian Maurice
+ - name: Victor Grousset
+ - name: Aleisha Amohia
+ - name: David Cook
+ - name: Laura Escamilla
+ - name: Jonathan Druart
+ - name: Pedro Amorim
+ - name: Matt Blenkinsop
+ - name: Thomas Klausner
+ te:
+ - area: UI Design
+ name: Owen Leonard
+ - area: Zebra
+ name: Fridolin Somers
+ - area: ERM
+ name: Matt Blenkinsop
+ - area: ILL
+ name: Pedro Amorim
+ - area: SIP2
+ name: Matthias Meusburger
+ - area: CAS
+ name: Matthias Meusburger
+ bugwrangler:
+ - name: Aleisha Amohia
+ - name: Jacob O'Mara
+ documentation:
+ name: Philip Orr
+ documentation_team:
+ - name: Aude Charillon
+ - name: Caroline Cyr La Rose
+ - name: Lucy Vaux-Harvey
+ - name: Emmanuel Bétemps
+ - name: Marie-Luce Laflamme
+ - name: Kelly McElligott
+ - name: Rasa Šatinskienė
+ - name: Heather Hernandez
+ meeting_facilitator:
+ - name: Paul Derscheid
+ packaging:
+ - name: Mason James
+ - name: Tomás Cohen Arazi
+ ktd:
+ - name: Tomás Cohen Arazi
+ - name: Jacob O'Mara
+ wiki:
+ - name: Thomas Dukleth
+ - name: George Williams
+ website:
+ - name: Liz Rea
+ newsletter:
+ name: Michael Kuhn
diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc
index cdf3aefb54..d9a9db593d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/merge-record.inc
@@ -51,6 +51,7 @@
[% WRAPPER tab_item tabname= "tabrecord${record.recordid}" %]
[% record.recordid | html %]
[% IF record.reference %](ref)[% END %]
+ ([% record.frameworktext | html %])
[% END %]
[% END %]
[% END # /WRAPPER tabs_nav %]
@@ -69,7 +70,7 @@
[% END %]
[% BLOCK mergetarget %]
-
Destination record
+ Destination record ([% authtypetext | html %])
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt
index c2e359abdc..cbc2ce147d 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/invoice.tt
@@ -382,7 +382,7 @@
[% order.budget_name | html %]
- Modify fund
+ Modify fund
|
[% END # /FOREACH order %]
@@ -615,16 +615,16 @@
$("#update_fund").data('order_id',$(this).data('order_id'));
$("#modify_budget_id").html(disabledBudgetsCopy);
$("#modify_budget_id").val(selected).find('option[value="'+selected+'"]').removeClass('b_inactive');
- $("#sort1").val(sort1);
- $("#sort2").val(sort2);
+ $("#updateFund").find('[name="sort1"]').val(sort1);
+ $("#updateFund").find('[name="sort2"]').val(sort2);
$("#modify_budget_id").find('.b_inactive').remove();
$("#modify_budget_id").change();
$("#updateFund").modal('show');
});
$("#update_fund").on('click',function(){
var new_fund = $("#modify_budget_id").val();
- var sort1 = $("#sort1").val();
- var sort2 = $("#sort2").val();
+ var sort1 = $("#updateFund").find('[name="sort1"]').val();
+ var sort2 = $("#updateFund").find('[name="sort2"]').val();
var new_fund_name = $('#modify_budget_id option[value="'+new_fund+'"]').text();
var order_id = $(this).data('order_id');
let options = {
@@ -642,6 +642,8 @@
$("#updateFund").modal('hide');
$('#updateFund .showallfunds').prop('checked',false);
$('.modify_fund[data-order_id="'+order_id+'"]').data('budget_id',new_fund);
+ $('.modify_fund[data-order_id="'+order_id+'"]').data('sort1',sort1);
+ $('.modify_fund[data-order_id="'+order_id+'"]').data('sort2',sort2);
$('.order_name[data-order_id="'+order_id+'"]').text(new_fund_name);
humanMsg.displayAlert( _("Order updated"), { className: 'humanError' } );
})
@@ -652,16 +654,16 @@
$("#modify_budget_id").change(function(){
var destination_sort1 = $(this).parents('.modal-body').find('input[name="sort1"]');
var sort1_authcat = $(this).find("option:selected").attr('data-sort1-authcat');
- var sort1 = $(destination_sort1).val() || "";
if ( destination_sort1.length < 1 ) {
destination_sort1 = $(this).parents('.modal-body').find('select[name="sort1"]');
}
+ var sort1 = $(destination_sort1).val() || "";
var destination_sort2 = $(this).parents('.modal-body').find('input[name="sort2"]');
var sort2_authcat = $(this).find("option:selected").attr('data-sort2-authcat');
- var sort2 = $(destination_sort2).val() || "";
if ( destination_sort2.length < 1 ) {
destination_sort2 = $(this).parents('.modal-body').find('select[name="sort2"]');
}
+ var sort2 = $(destination_sort2).val() || "";
getAuthValueDropbox( 'sort1', sort1_authcat, destination_sort1, sort1 );
getAuthValueDropbox( 'sort2', sort2_authcat, destination_sort2, sort2 );
});
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt
index d2fb80baff..f9607b9f32 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/authorities/merge.tt
@@ -102,7 +102,7 @@ div#result { margin-top: 1em; }
[% PROCESS mergesource sourcerecords=records %]
-[% PROCESS mergetarget %]
+[% PROCESS mergetarget authtypetext=frameworktext %]
@@ -111,6 +111,10 @@ div#result { margin-top: 1em; }
+[% IF multipleauthtypes %]
+ Multiple authority types are used. There may be data loss when merging.
+[% END %]
+
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt
index 001558e1f6..e745fb1a4c 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/rotating_collections/editCollections.tt
@@ -128,19 +128,19 @@
[% IF ( editColTitle ) %]
-
+
Required
[% ELSE %]
-
+
Required
[% END %]
[% IF (editColDescription ) %]
-
+
[% ELSE %]
-
+
[% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
index 7fa381f574..5871e3b249 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/viewlog.tt
@@ -156,7 +156,7 @@
[% BLOCK translate_log_interface %]
[% SWITCH log_interface.upper %]
-[% CASE 'INTRANET' %]Intranet
+[% CASE 'INTRANET' %]Staff interface
[% CASE 'OPAC' %]OPAC
[% CASE 'SIP' %]SIP
[% CASE 'COMMANDLINE' %]Command-line
diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
index 7fbdd6763c..8651af7d92 100644
--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/sco/sco-main.tt
@@ -5,6 +5,7 @@
[% USE AudioAlerts %]
[% USE To %]
[% USE Price %]
+[% USE Branches %]
[% INCLUDE 'doc-head-open.inc' %]
Self checkout › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha [% END %]
diff --git a/mainpage.pl b/mainpage.pl
index e1c033f18a..1bacb77e16 100755
--- a/mainpage.pl
+++ b/mainpage.pl
@@ -88,10 +88,10 @@ my $pendingtags = get_count_by_tag_status(0);
# both to template
if( C4::Context->only_my_library ){
- my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'} })->count();
+ my $local_pendingsuggestions_count = Koha::Suggestions->search({ status => "ASKED", branchcode => C4::Context->userenv()->{'branch'}, archived => 0 })->count();
$template->param( pendingsuggestions => $local_pendingsuggestions_count );
} else {
- my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED" });
+ my $pendingsuggestions = Koha::Suggestions->search({ status => "ASKED", archived => 0 });
my $local_pendingsuggestions_count = $pendingsuggestions->search({ 'me.branchcode' => C4::Context->userenv()->{'branch'} })->count();
my $pendingsuggestions_count = $pendingsuggestions->count();
$template->param(
diff --git a/svc/bib b/svc/bib
index 53e6fc753e..da96e01f9a 100755
--- a/svc/bib
+++ b/svc/bib
@@ -70,14 +70,14 @@ sub fetch_bib {
my $record;
my $exception;
my $invalid_metadata = 0;
- eval { $record = $biblio->metadata->record( { embed_items => scalar $query->param('items') } ) };
- if ($@) {
- $exception = $@;
- $exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') );
- $record = $biblio->metadata->record_strip_nonxml( { embed_items => scalar $query->param('items') } );
- $invalid_metadata = 1;
- }
- if ( defined $record ) {
+ if ( defined $biblio ) {
+ eval { $record = $biblio->metadata->record( { embed_items => scalar $query->param('items') } ) };
+ if ($@) {
+ $exception = $@;
+ $exception->rethrow unless ( $exception->isa('Koha::Exceptions::Metadata::Invalid') );
+ $record = $biblio->metadata->record_strip_nonxml( { embed_items => scalar $query->param('items') } );
+ $invalid_metadata = 1;
+ }
print $query->header( -type => 'text/xml', -charset => 'utf-8', -invalid_metadata => $invalid_metadata );
print $record->as_xml_record();
} else {
diff --git a/virtualshelves/shelves.pl b/virtualshelves/shelves.pl
index 52cc6d6c9a..ce7b628a1c 100755
--- a/virtualshelves/shelves.pl
+++ b/virtualshelves/shelves.pl
@@ -273,7 +273,9 @@ if ( $op eq 'view' ) {
my $direction = $query->param('direction') || 'asc';
$direction = 'asc' if $direction ne 'asc' and $direction ne 'desc';
my $rows;
- unless ( $query->param('print') ) {
+ if ( $query->param('print') ) {
+ $page = "";
+ } else {
$rows = C4::Context->preference('numSearchResults') || 20;
}