Jonathan Druart
172ebfe520
The marc subfield structure is currently cached using a global variable of C4::Context. The infos are retrieved every time a new context is created. This patch suggests to use Koha::Cache instead. To achieve this goal, a new subroutine is created C4::Biblio::GetMarcSubfieldStructure, it will be called from code which needs to get the marc subfield structure. GetMarcFromKohaField, GetMarcSubfieldStructureFromKohaField, TransformKohaToMarc and _get_inverted_marc_field_map are modified accordingly and the cache is cleared when the table is updated (from the 3 pl scripts modified by this patch). The caching done in C4::Context (marcfromkohafield) is removed. Test plan: Play with the marc subfield structure (in the administration module), then add and edit records and make sure everything went fine. Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Everything works as expected on my functional tests. I'm really happy to see the patch introduces relevant tests for previously untested functions. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> |
||
---|---|---|
.. | ||
searchengine/elasticsearch | ||
add_user_search.pl | ||
admin-home.pl | ||
aqbudgetperiods.pl | ||
aqbudgets.pl | ||
aqcontract.pl | ||
aqplan.pl | ||
audio_alerts.pl | ||
auth_subfields_structure.pl | ||
auth_tag_structure.pl | ||
authorised_values.pl | ||
authtypes.pl | ||
biblio_framework.pl | ||
branch_transfer_limits.pl | ||
branches.pl | ||
categories.pl | ||
check_budget_parent.pl | ||
check_parent_total.pl | ||
checkmarc.pl | ||
cities.pl | ||
classsources.pl | ||
clone-rules.pl | ||
columns_settings.pl | ||
columns_settings.yml | ||
currency.pl | ||
didyoumean.pl | ||
edi_accounts.pl | ||
edi_ean_accounts.pl | ||
env_tz_test.pl | ||
fieldmapping.pl | ||
import_export_framework.pl | ||
item_circulation_alerts.pl | ||
items_search_field.pl | ||
items_search_fields.pl | ||
itemtypes.pl | ||
koha2marclinks.pl | ||
localization.pl | ||
marc_subfields_structure.pl | ||
marctagstructure.pl | ||
matching-rules.pl | ||
oai_set_mappings.pl | ||
oai_sets.pl | ||
patron-attr-types.pl | ||
preferences.pl | ||
printers.pl | ||
smart-rules.pl | ||
sms_providers.pl | ||
sru_modmapping.pl | ||
systempreferences.pl | ||
transport-cost-matrix.pl | ||
z3950servers.pl |