Overview
Comment:setTranslationTable expects an array
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA3-256: d40d4ff08373840a8ec38afde76847562cec4f3b428389b9779c69756425409f
User & Date: bohwaz on 2021-03-08 15:33:03
Other Links: manifest | tags
Context
2021-03-09
11:27
Fix export of analytical codes in simple list check-in: 1e9aa61835 user: bohwaz tags: trunk, stable
2021-03-08
15:33
setTranslationTable expects an array check-in: d40d4ff083 user: bohwaz tags: trunk, stable
15:32
Make sure that year is set check-in: 2217843c43 user: bohwaz tags: trunk, stable
Changes

Modified src/www/admin/membres/import.php from [96ebef83f0] to [9914c40830].

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

if (f('cancel')) {
    $csv->clear();
    Utils::redirect(Utils::getSelfURI(false));
}

$form->runIf(f('import') && $csv->loaded(), function () use ($csv, $import, $user) {
    $csv->setTranslationTable(f('translation_table'));
    $csv->skip((int)f('skip_first_line'));
    $import->fromCustomCSV($csv, $user->id);
    $csv->clear();
}, $csrf_key, ADMIN_URL . 'membres/import.php?ok');

$form->runIf(f('import') && f('type') == 'garradin' && !empty($_FILES['upload']['tmp_name']), function () use ($import, $user) {
    $import->fromGarradinCSV($_FILES['upload']['tmp_name'], $user->id);







|







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

if (f('cancel')) {
    $csv->clear();
    Utils::redirect(Utils::getSelfURI(false));
}

$form->runIf(f('import') && $csv->loaded(), function () use ($csv, $import, $user) {
    $csv->setTranslationTable(f('translation_table') ?? []);
    $csv->skip((int)f('skip_first_line'));
    $import->fromCustomCSV($csv, $user->id);
    $csv->clear();
}, $csrf_key, ADMIN_URL . 'membres/import.php?ok');

$form->runIf(f('import') && f('type') == 'garradin' && !empty($_FILES['upload']['tmp_name']), function () use ($import, $user) {
    $import->fromGarradinCSV($_FILES['upload']['tmp_name'], $user->id);