From a8fb3a676cdf5728a762bc28ec8ad95f27ae2677 Mon Sep 17 00:00:00 2001 From: Joshua Ramon Enslin Date: Wed, 12 Aug 2020 16:13:57 +0200 Subject: [PATCH] Add MDTlLoader, loading of currencies via MDAllowedValueSets phpcs-errors:226 phpunit-status:successful --- .gitignore | 1 + .gitmodules | 3 +++ classes/MDTlLoader | 1 + values/availableFields.php | 4 ++++ 4 files changed, 9 insertions(+) create mode 160000 classes/MDTlLoader diff --git a/.gitignore b/.gitignore index e0ee4a6..115bbf0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ /csv +/cache /composer.lock /translation-importer /values/langfiles diff --git a/.gitmodules b/.gitmodules index 189fa48..76f705a 100644 --- a/.gitmodules +++ b/.gitmodules @@ -10,3 +10,6 @@ [submodule "classes/MDAllowedValueSets"] path = classes/MDAllowedValueSets url = /var/www/vhosts/museum-digital.de/git-base/MDAllowedValueSets +[submodule "classes/MDTlLoader"] + path = classes/MDTlLoader + url = /var/www/vhosts/museum-digital.de/git-base/MDTlLoader/ diff --git a/classes/MDTlLoader b/classes/MDTlLoader new file mode 160000 index 0000000..e812aa8 --- /dev/null +++ b/classes/MDTlLoader @@ -0,0 +1 @@ +Subproject commit e812aa872619c7b8f42f2cfff382e93114c40bee diff --git a/values/availableFields.php b/values/availableFields.php index 50a8930..d021b9e 100644 --- a/values/availableFields.php +++ b/values/availableFields.php @@ -12,6 +12,8 @@ declare(strict_types = 1); require __DIR__ . "/../mdAvailableLicenses/licenses.php"; require __DIR__ . "/../translation-importer/$lang/csvxml-overview.php"; +$tlLoader = new MDTlLoader("available_fields", $lang); + foreach (array_diff(scandir(__DIR__ . "/langfiles/$lang/"), ['.', '..']) as $fileName) { if (in_array($fileName, ['start.php', 'start2.php'])) continue; include __DIR__ . "/langfiles/{$lang}/{$fileName}"; @@ -21,6 +23,8 @@ require __DIR__ . "/commonservices/$lang/search_all_fields.php"; require __DIR__ . "/commonservices/units.php"; require __DIR__ . "/langfiles/$lang/eventtype_name.php"; +$currencies = MDCurrenciesSet::getSortedList($tlLoader); + if (empty($fieldNoMultiplicator) or !is_numeric($fieldNoMultiplicator)) { $fieldNoMultiplicator = 1; }