Add MDTlLoader, loading of currencies via MDAllowedValueSets

phpcs-errors:226 phpunit-status:successful
This commit is contained in:
Joshua Ramon Enslin 2020-08-12 16:13:57 +02:00 committed by Stefan Rohde-Enslin
parent ca62a0bec6
commit a8fb3a676c
4 changed files with 9 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,4 +1,5 @@
/csv /csv
/cache
/composer.lock /composer.lock
/translation-importer /translation-importer
/values/langfiles /values/langfiles

3
.gitmodules vendored
View File

@ -10,3 +10,6 @@
[submodule "classes/MDAllowedValueSets"] [submodule "classes/MDAllowedValueSets"]
path = classes/MDAllowedValueSets path = classes/MDAllowedValueSets
url = /var/www/vhosts/museum-digital.de/git-base/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/

1
classes/MDTlLoader Submodule

@ -0,0 +1 @@
Subproject commit e812aa872619c7b8f42f2cfff382e93114c40bee

View File

@ -12,6 +12,8 @@ declare(strict_types = 1);
require __DIR__ . "/../mdAvailableLicenses/licenses.php"; require __DIR__ . "/../mdAvailableLicenses/licenses.php";
require __DIR__ . "/../translation-importer/$lang/csvxml-overview.php"; require __DIR__ . "/../translation-importer/$lang/csvxml-overview.php";
$tlLoader = new MDTlLoader("available_fields", $lang);
foreach (array_diff(scandir(__DIR__ . "/langfiles/$lang/"), ['.', '..']) as $fileName) { foreach (array_diff(scandir(__DIR__ . "/langfiles/$lang/"), ['.', '..']) as $fileName) {
if (in_array($fileName, ['start.php', 'start2.php'])) continue; if (in_array($fileName, ['start.php', 'start2.php'])) continue;
include __DIR__ . "/langfiles/{$lang}/{$fileName}"; include __DIR__ . "/langfiles/{$lang}/{$fileName}";
@ -21,6 +23,8 @@ require __DIR__ . "/commonservices/$lang/search_all_fields.php";
require __DIR__ . "/commonservices/units.php"; require __DIR__ . "/commonservices/units.php";
require __DIR__ . "/langfiles/$lang/eventtype_name.php"; require __DIR__ . "/langfiles/$lang/eventtype_name.php";
$currencies = MDCurrenciesSet::getSortedList($tlLoader);
if (empty($fieldNoMultiplicator) or !is_numeric($fieldNoMultiplicator)) { if (empty($fieldNoMultiplicator) or !is_numeric($fieldNoMultiplicator)) {
$fieldNoMultiplicator = 1; $fieldNoMultiplicator = 1;
} }