Koha-clms/Koha
Tomas Cohen Arazi ecd91d6089
Bug 31069: Remove ExplodedTerms dependency on templates
This patch removes the use of templates and CGI in ExplodedTerms by using the
Koha::I18N library.

The functionality on the package is too simple, and messing with the
template paths complexity on the tests was too much, given we have a
nice way to have translatable strings at the package level.

This patch does that, and cleans up the test file as well, that required
complex template and CGI mocking to run properly.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/SuggestionEngine_ExplodedTerms.t
=> FAIL: It fails in master
2. Apply this patch
3. Repeat 1
=> SUCCESS: Tests pass
4. Follow the original test plan
=> SUCCESS: Things work
5. Enjoy the rest of the day and forget this ever happened

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
2022-07-18 12:37:35 -03:00
..
Account Bug 31036: Treat SIP00 that same as CASH 2022-07-18 10:27:59 -03:00
Acquisition Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
App Bug 29498: Remove usage of deprecated Mojolicious::Routes::Route::detour 2022-01-18 21:15:04 -10:00
ArticleRequest Bug 27944: (follow-up) Move statuses to constants 2021-10-05 10:58:14 +02:00
Auth Bug 28998: (follow-up) Apply changes to TwoFactorAuth module and script 2022-05-04 05:18:31 -10:00
Authority Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
BackgroundJob Bug 30974: Set size for indexing jobs to 1 2022-06-16 09:41:32 -03:00
Biblio Bug 31140: (QA follow-up) Remove leftover POD 2022-07-12 10:44:57 -03:00
BiblioUtils Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Cache Bug 29623: (QA follow-up) Add POD to Koha::Cache::Lite 2022-06-14 08:26:59 -03:00
Cash Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Charges Bug 22435: (follow-up) Update POS for reduced offset types 2021-08-04 14:06:43 +02:00
Checkouts Bug 28854: Improve lost details display for bundle items 2022-07-13 10:35:36 -03:00
Club Bug 29562: Adjust CanItemBeReserved and checkHighHolds to take objects 2022-01-31 21:55:39 -10:00
Config Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Course Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Database Bug 21978: Add support for middle name 2022-06-24 12:24:11 -03:00
Edifact Bug 30135: Add EdifactLSQ mapping preference 2022-04-13 15:55:39 +02:00
Exceptions Bug 30275: (follow-up) Drop renewer_id constraint 2022-07-05 09:46:18 -03:00
Exporter Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ExternalContent Bug 29686: Adapt Koha to use new fulfillment API for OverDrive 2022-01-28 11:09:06 -10:00
Filter/MARC Bug 30848: Fix issue exposed by unit tests 2022-07-01 09:15:46 -03:00
Illrequest Bug 22614: Migrate original request 2021-09-21 20:22:57 +02:00
Import Bug 29333: (QA follow-up) POD consistency 2022-07-08 15:46:08 -03:00
Indexer
…
Item Bug 28445: Split and join on ' | ' instead of '|' for repeatable 2021-10-18 11:28:40 +02:00
Library Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
List Bug 16446: Add ability to add patrons to list by borrowernumber 2021-10-21 12:24:04 +02:00
MetadataRecord Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Middleware Bug 28955: Add OPAC_BRANCH_DEFAULT 2022-02-24 14:35:36 -10:00
Misc
…
Notice Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Number Bug 26239: Do not format large negative numbers 2020-08-19 08:22:02 +02:00
OAI/Server Bug 30143: OAI-PMH: Fix SQL query used to fetch deleted records 2022-05-03 11:19:50 -10:00
Object Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Objects Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Old Bug 30275: Add renewals relation to Koha::Old::Checkout 2022-07-05 09:46:14 -03:00
Patron Bug 30611: (follow-up) Use constants 2022-05-10 15:17:17 -10:00
Patrons Bug 28786: Fix Patrons/Import.t 2022-04-21 13:09:45 -10:00
Plugins Bug 29121: Catch errors in ->install and ->upgrade calls on plugins 2021-10-01 16:28:55 +02:00
REST Bug 28854: (follow-up) Use barcodedecode in Koha::REST::V1::Items 2022-07-13 10:36:00 -03:00
RecordProcessor
…
Result Bug 29746: (it-doesn't-hurt follow-up) More tests 2022-01-05 13:33:46 -10:00
SMS Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SMTP Bug 28416: Delay load of Email::Sender::Transport::SMTP 2022-03-25 11:01:04 -10:00
Schema Bug 29632: DBIC update 2022-07-18 12:11:15 -03:00
SearchEngine Bug 29632: Don't sort cn-sort numerically 2022-07-18 11:21:47 -03:00
Serial Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Sitemapper Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Subscription Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SuggestionEngine Bug 31069: Remove ExplodedTerms dependency on templates 2022-07-18 12:37:35 -03:00
Tags Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Template/Plugin Bug 29454: Use Koha Cache Memory Lite to stash itemtype descriptions for template plugin 2022-06-24 11:55:34 -03:00
UI Bug 29788: Fix batch delete item 2022-01-11 12:38:35 -10:00
Util Bug 11175: (QA follow-up) Move get_component_part_query 2021-10-26 16:46:02 +02:00
XSLT Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Z3950Responder Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
pdfformat Bug 18984: Remove NORMARC support 2021-10-07 15:36:40 +02:00
Account.pm Bug 31036: Treat SIP00 that same as CASH 2022-07-18 10:27:59 -03:00
ActionLog.pm
…
ActionLogs.pm
…
AdditionalContent.pm Bug 24387: Rename "News" with "Additional contents" 2021-08-16 11:55:55 +02:00
AdditionalContents.pm Bug 29332: Set default library limits in search_for_display 2021-10-28 12:16:37 +02:00
AdditionalField.pm
…
AdditionalFieldValue.pm
…
AdditionalFieldValues.pm
…
AdditionalFields.pm
…
AdvancedEditorMacro.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AdvancedEditorMacros.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ApiKey.pm Bug 28772: Make validate_secret return 1|0 2021-09-30 09:48:41 +02:00
ApiKeys.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ArticleRequest.pm Bug 29759: Make cancelling an AR refund 2022-01-31 21:55:39 -10:00
ArticleRequests.pm Bug 29082: Add filtering methods to Koha::ArticleRequests 2021-10-07 10:54:59 +02:00
AudioAlert.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AudioAlerts.pm Bug 29859: Use iterator instead of as_list 2022-02-09 15:36:23 -10:00
AuthUtils.pm Bug 28772: Add a warning about hash_password usage in updatedatabase.pl 2021-09-30 09:19:05 +02:00
AuthorisedValue.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AuthorisedValueCategories.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AuthorisedValueCategory.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
AuthorisedValues.pm Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Authorities.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Authority.pm
…
BackgroundJob.pm Bug 30889: (follow-up) Warn if context is not defined 2022-07-01 11:13:39 -03:00
BackgroundJobs.pm Bug 22417: Add missing POD and html filters 2020-10-05 15:23:08 +02:00
Biblio.pm Bug 24857: Add Object Methods 2022-07-08 15:59:59 -03:00
BiblioFramework.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
BiblioFrameworks.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
BiblioUtils.pm Bug 29625: Fix var name in Koha::BiblioUtils get_all_biblios_iterator 2022-02-21 15:15:47 -10:00
Biblioitem.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Biblioitems.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Biblios.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Cache.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Caches.pm
…
Calendar.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Checkout.pm Bug 30275: Add renewals relation to Koha::Checkout 2022-07-05 09:46:02 -03:00
Checkouts.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CirculationRule.pm
…
CirculationRules.pm Bug 29623: (QA follow-up) Add POD to Koha::CirculationRules 2022-06-14 08:26:59 -03:00
Cities.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
City.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSortRule.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSortRules.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSource.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSources.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSplitRule.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
ClassSplitRules.pm
…
Club.pm Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Clubs.pm Bug 29844: Simplify Koha::Clubs->get_enrollable 2022-02-09 15:36:23 -10:00
Config.pm Bug 28306: Allow to query database with minimal memory footprint 2021-08-31 10:27:52 +02:00
CookieManager.pm Bug 30703: Remove a few CookieManager warnings 2022-05-06 10:33:10 -10:00
Course.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Courses.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CoverImage.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CoverImages.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CsvProfile.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
CsvProfiles.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Database.pm Bug 19821: Use database_test entry if exists 2021-10-25 11:27:40 +02:00
DateUtils.pm Bug 30717: (QA follow-up) Move to module 2022-05-13 15:41:55 -10:00
Desk.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Desks.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
EDI.pm Bug 31054: Manual importing for EDIFACT invoices fails with a 500 error page 2022-07-11 18:23:12 -03:00
Edifact.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Email.pm Bug 29330: Add Koha::Email->new_from_string 2021-11-15 12:38:39 +01:00
Encryption.pm Bug 31053: Add Context module to Koha::Encryption 2022-06-27 11:46:22 -03:00
Exception.pm Bug 29857: (QA follow-up) Add license 2022-03-01 22:47:47 -10:00
Exceptions.pm Bug 30057: Move virtualshelf-related exceptions to a separate library 2022-06-06 14:30:37 -03:00
ExternalContent.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
FrameworkPlugin.pm Bug 28769: Remove tabloop from cataloguing plugins 2021-10-18 11:28:40 +02:00
Hold.pm Bug 30728: Only trigger real-time holds queue update if enabled 2022-05-12 22:17:46 -10:00
Holds.pm Bug 30730: (follow-up) Simplify query 2022-05-23 08:52:40 -10:00
I18N.pm Bug 17600: (follow-up) Fix wrong import in Koha::I18N - LC_MESSAGES 2021-07-27 14:49:22 +02:00
Illcomment.pm
…
Illcomments.pm
…
Illrequest.pm Bug 30947: Simplify CanBookBeIssued date handling 2022-06-23 11:38:44 -03:00
Illrequestattribute.pm
…
Illrequestattributes.pm
…
Illrequests.pm
…
ImportBatch.pm Bug 23019: Add profiles to stage-import-batch and magnage-import-batch pages 2020-11-11 15:55:49 +01:00
ImportBatchProfile.pm Bug 23019: (follow-up) Fix other things 2020-11-11 15:55:49 +01:00
ImportBatchProfiles.pm Bug 23019: (follow-up) Fix other things 2020-11-11 15:55:49 +01:00
ImportBatches.pm Bug 23019: Add profiles to stage-import-batch and magnage-import-batch pages 2020-11-11 15:55:49 +01:00
Item.pm Bug 28854: (QA follow-up) Fix QA tool complaints 2022-07-13 10:35:45 -03:00
ItemType.pm Bug 29844: Some more uncaught cases 2022-02-09 15:36:23 -10:00
ItemTypes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Items.pm Bug 30465: Fix Koha/Items/BatchUpdate.t 2022-05-06 10:41:55 +01:00
KeyboardShortcut.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
KeyboardShortcuts.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Libraries.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Library.pm Bug 28948: (QA follow-up) Convert to allow-list 2021-10-28 17:32:34 +02:00
Linktracker.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Localization.pm
…
Localizations.pm
…
Logger.pm Bug 25464: Add ability to specify client IP and SIP account used in SIP2 logging 2021-07-26 12:46:32 +02:00
Manual.pm Bug 24387: Rename "News" with "Additional contents" 2021-08-16 11:55:55 +02:00
MarcOverlayRule.pm Bug 14957: (QA follow-up) Rename 'merge' => 'overlay' 2021-10-26 16:46:02 +02:00
MarcOverlayRules.pm Bug 14957: Fix field order issue 2021-10-26 16:46:03 +02:00
MarcSubfieldStructure.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MarcSubfieldStructures.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MessageAttribute.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MessageAttributes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
MetaSearcher.pm Bug 30813: (QA follow-up) Adjust three use statements 2022-06-08 11:40:32 -03:00
MetadataIterator.pm
…
MetadataRecord.pm Bug 30813: (follow-up) Correct C4::Breeding call 2022-06-08 11:40:31 -03:00
MoreUtils.pm
…
OAuth.pm Bug 28772: Make secret validation use the new method 2021-09-30 09:19:05 +02:00
OAuthAccessToken.pm
…
OAuthAccessTokens.pm
…
Object.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
Objects.pm Bug 29844: Remove use of wantarray from Koha::Objects 2022-02-09 15:36:23 -10:00
Patron.pm Bug 31005: Don't inlcude attributes only required for other categories 2022-06-24 11:36:19 -03:00
Patrons.pm Bug 30058: Add Koha::Patrons->filter_by_have_subpermission 2022-03-17 11:22:56 -10:00
Plugins.pm Bug 30180: (follow-up) Add temporary deprecation warning 2022-05-04 14:29:24 -10:00
ProblemReport.pm
…
ProblemReports.pm
…
PseudonymizedTransaction.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
PseudonymizedTransactions.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Quote.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Quotes.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
RDF.pm
…
Rating.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Ratings.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Recall.pm Bug 30823: Filling recalls uses 'FILL' action in action logs 2022-07-01 16:09:13 -03:00
Recalls.pm Bug 30291: Changes to controller scripts 2022-05-05 11:17:36 -10:00
RecordProcessor.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Report.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Reports.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Review.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Reviews.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Schema.pm
…
Script.pm Bug 29857: Rename base class as Koha::Exception 2022-03-01 22:47:47 -10:00
SearchEngine.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchField.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchFields.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchMarcMap.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SearchMarcMaps.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Serial.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Serials.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SharedContent.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
SimpleMARC.pm Bug 23873: Enable capture groups in MarcModificationTemplates 2022-02-21 15:15:47 -10:00
Sitemapper.pm
…
Statistic.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Statistics.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
StockRotationItem.pm Bug 30518: Correct DateTime maths for needs_advancing 2022-04-19 21:25:50 -10:00
StockRotationItems.pm
…
StockRotationRota.pm
…
StockRotationRotas.pm
…
StockRotationStage.pm
…
StockRotationStages.pm
…
Subscription.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Subscriptions.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Suggestion.pm Bug 17314: Implement /suggestions routes 2021-10-28 17:32:34 +02:00
SuggestionEngine.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Suggestions.pm Bug 30663: Add Koha::Suggestions helper methods 2022-05-05 10:26:41 -03:00
Tag.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Tags.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Token.pm Bug 29543: Add JWT token handling 2022-02-02 21:05:29 -10:00
TrackedLink.pm Bug 22690: (QA follow-up) Add TrackedLink classes and use them 2021-08-27 11:02:41 +02:00
TrackedLinks.pm Bug 22690: (QA follow-up) Add TrackedLink classes and use them 2021-08-27 11:02:41 +02:00
UploadedFile.pm Bug 29156: File missing warning in Koha::UploadedFile for permanent files only 2022-01-21 21:34:51 -10:00
UploadedFiles.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Uploader.pm Bug 29844: Fix ->search occurrences 2022-02-09 15:36:23 -10:00
Virtualshelf.pm Bug 30057: Move virtualshelf-related exceptions to a separate library 2022-06-06 14:30:37 -03:00
Virtualshelfcontent.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Virtualshelfcontents.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Virtualshelfshare.pm Bug 30057: Move virtualshelf-related exceptions to a separate library 2022-06-06 14:30:37 -03:00
Virtualshelfshares.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Virtualshelves.pm Bug 26346: Add option to make public lists editable by all staff 2022-04-12 17:13:02 +02:00
Z3950Responder.pm Bug 25292: Flushing L1 on every Z3950 server search 2021-01-11 10:27:37 +01:00
Z3950Server.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00
Z3950Servers.pm Bug 17600: Standardize our EXPORT_OK 2021-07-16 08:58:47 +02:00