Overview
Comment: | Correction traitement de valeurs non fournies (null) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | stable |
Files: | files | file ages | folders |
SHA1: |
f24cfb81db8afbb0c03c8319596160ee |
User & Date: | bohwaz on 2018-12-10 23:21:42 |
Other Links: | manifest | tags |
Context
2018-12-18
| ||
13:49 | Utiliser DB::userSelect* pour les requêtes en lecture check-in: 836495093b user: bohwaz tags: trunk, stable | |
2018-12-10
| ||
23:21 | Correction traitement de valeurs non fournies (null) check-in: f24cfb81db user: bohwaz tags: trunk, stable | |
2018-12-09
| ||
20:09 | Fix échappement des noms de champs à l'export check-in: a3b5039145 user: bohwaz tags: trunk, stable | |
Changes
Modified src/include/lib/Garradin/Wiki.php from [d68669124c] to [a63e6d83d2].
︙ | ︙ | |||
29 30 31 32 33 34 35 | // Gestion des données /////////////////////////////////////////////////////// public function _checkFields(&$data) { $db = DB::getInstance(); | | | | | | | 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | // Gestion des données /////////////////////////////////////////////////////// public function _checkFields(&$data) { $db = DB::getInstance(); if (array_key_exists('titre', $data) && !trim($data['titre'])) { throw new UserException('Le titre ne peut rester vide.'); } if (array_key_exists('uri', $data) && !trim($data['uri'])) { throw new UserException('L\'adresse de la page ne peut rester vide.'); } if (array_key_exists('droit_lecture', $data)) { $data['droit_lecture'] = (int) $data['droit_lecture']; if ($data['droit_lecture'] < -1) { $data['droit_lecture'] = 0; } } if (array_key_exists('droit_ecriture', $data)) { $data['droit_ecriture'] = (int) $data['droit_ecriture']; if ($data['droit_ecriture'] < 0) { $data['droit_ecriture'] = 0; } } if (array_key_exists('parent', $data)) { $data['parent'] = (int) $data['parent']; if ($data['parent'] < 0) { $data['parent'] = 0; } |
︙ | ︙ |