diff --git a/C4/SIP/Sip/Configuration.pm b/C4/SIP/Sip/Configuration.pm index 41b4288577..4a492f5d0d 100644 --- a/C4/SIP/Sip/Configuration.pm +++ b/C4/SIP/Sip/Configuration.pm @@ -56,6 +56,7 @@ sub get_configuration { } else { $cfg = $current_config; } + die unless $cfg; my %listeners; # The key to the listeners hash is the 'port' component of the diff --git a/Koha/SIP2/Object.pm b/Koha/SIP2/Object.pm index 2a55d217f4..6555785d72 100644 --- a/Koha/SIP2/Object.pm +++ b/Koha/SIP2/Object.pm @@ -39,7 +39,7 @@ This is the base class for SIP2 objects in the Koha library system. =head3 store -store + store wrapper =cut @@ -50,6 +50,12 @@ sub store { return $self->SUPER::store; } +=head3 delete + + delete wrapper + +=cut + sub delete { my ($self) = @_; @@ -57,6 +63,12 @@ sub delete { return $self->SUPER::delete; } +=head3 _update_config_timestamp + + Updates the sip2_resource_last_modified timestamp in cache + +=cut + sub _update_config_timestamp { my $cache = Koha::Caches->get_instance(); $cache->set_in_cache( 'sip2_resource_last_modified', dt_from_string()->epoch ); diff --git a/Koha/Schema/Result/SipAccount.pm b/Koha/Schema/Result/SipAccount.pm index 63c75b748c..8dac7953ea 100644 --- a/Koha/Schema/Result/SipAccount.pm +++ b/Koha/Schema/Result/SipAccount.pm @@ -581,9 +581,22 @@ __PACKAGE__->add_columns( "+show_outstanding_amount" => { is_boolean => 1 } ); +=head2 koha_objects_class + + Koha Objects class + +=cut + sub koha_objects_class { 'Koha::SIP2::Accounts'; } + +=head2 koha_object_class + + Koha Object class + +=cut + sub koha_object_class { 'Koha::SIP2::Account'; } diff --git a/Koha/Schema/Result/SipAccountSystemPreferenceOverride.pm b/Koha/Schema/Result/SipAccountSystemPreferenceOverride.pm index 8ea7cf890b..b618b0ad60 100644 --- a/Koha/Schema/Result/SipAccountSystemPreferenceOverride.pm +++ b/Koha/Schema/Result/SipAccountSystemPreferenceOverride.pm @@ -121,10 +121,22 @@ __PACKAGE__->belongs_to( # You can replace this text with custom code or comments, and it will be preserved on regeneration +=head2 koha_objects_class + + Koha Objects class + +=cut + sub koha_objects_class { 'Koha::SIP2::Accounts::SystemPreferenceOverrides'; } +=head2 koha_object_class + + Koha Object class + +=cut + sub koha_object_class { 'Koha::SIP2::Account::SystemPreferenceOverride'; } diff --git a/Koha/Schema/Result/SipInstitution.pm b/Koha/Schema/Result/SipInstitution.pm index 330789350d..aac923dff2 100644 --- a/Koha/Schema/Result/SipInstitution.pm +++ b/Koha/Schema/Result/SipInstitution.pm @@ -195,9 +195,22 @@ __PACKAGE__->add_columns( "+status_update" => { is_boolean => 1 } ); +=head2 koha_objects_class + + Koha Objects class + +=cut + sub koha_objects_class { 'Koha::SIP2::Institutions'; } + +=head2 koha_object_class + + Koha Object class + +=cut + sub koha_object_class { 'Koha::SIP2::Institution'; } diff --git a/Koha/Schema/Result/SipSystemPreferenceOverride.pm b/Koha/Schema/Result/SipSystemPreferenceOverride.pm index 81581b42fc..a01729fe93 100644 --- a/Koha/Schema/Result/SipSystemPreferenceOverride.pm +++ b/Koha/Schema/Result/SipSystemPreferenceOverride.pm @@ -72,11 +72,22 @@ __PACKAGE__->set_primary_key("sip_system_preference_override_id"); # Created by DBIx::Class::Schema::Loader v0.07051 @ 2025-02-10 10:27:51 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:szyNGurH+wJBItdnYfAoRA +=head2 koha_objects_class + + Koha Objects class + +=cut sub koha_objects_class { 'Koha::SIP2::SystemPreferenceOverrides'; } +=head2 koha_object_class + + Koha Object class + +=cut + sub koha_object_class { 'Koha::SIP2::SystemPreferenceOverride'; }