Overview
Comment:Corrige export champs multi lignes pour Excel, signalé par @David
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA1: 82c8c1fade8a6b05900a9bab6bdcefdc7adb3e54
User & Date: bohwaz on 2017-12-10 22:28:50
Other Links: manifest | tags
References
2020-12-08
23:25 Wiki page "Changelog/0.9" artifact: b9c916b4d1 user: bohwaz
Context
2018-01-10
02:26
Permettre d'avoir WWW_URL et ADMIN_URL dans des endroits différents check-in: c1d8c7b3f3 user: bohwaz tags: trunk, stable
2017-12-10
22:28
Corrige export champs multi lignes pour Excel, signalé par @David check-in: 82c8c1fade user: bohwaz tags: trunk, stable
2017-11-08
00:22
Suppression facilités pour installer en sous-domaine avec apache, car ça ne marche pas check-in: 3ea371099b user: bohwaz tags: trunk
Changes

Modified src/include/lib/Garradin/Membres/Import.php from [098ef3dec9] to [4ee4e4e20f].

274
275
276
277
278
279
280
281

282
283
284
285
286
287
288
274
275
276
277
278
279
280

281
282
283
284
285
286
287
288







-
+








            if (!$header)
            {
                fputcsv($fp, array_keys($row));
                $header = true;
            }

            fputs($fp, Utils::row_to_csv($row) . "\n");
            fputs($fp, Utils::row_to_csv($row) . "\r\n");
        }

        fclose($fp);

        return true;
    }
}

Modified src/include/lib/Garradin/Utils.php from [9570b55b87] to [dc41f212bc].

715
716
717
718
719
720
721
722

723
724
725
726
727
715
716
717
718
719
720
721

722
723
724
725
726
727







-
+





    }

    static public function row_to_csv($row)
    {
        $row = (array) $row;

        array_walk($row, function ($field) {
            return str_replace('"', '""', $field);
            return strtr($field, ['"' => '""', "\r\n" => "\n"]);
        });

        return '"' . implode('", "', $row) . '"';
    }
}