Overview
Comment: | Ne pas accepter les noms de champs qui commencent par un chiffre (refusés par SQLite). |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1e224909d523c6ef6a3a4ab2b2a3c2f7 |
User & Date: | bohwaz on 2016-05-31 04:29:37 |
Other Links: | manifest | tags |
References
2020-12-08
| ||
23:25 | • Wiki page "Changelog/0.9" artifact: b9c916b4d1 user: bohwaz | |
Context
2016-05-31
| ||
04:38 | Ne pas permettre de supprimer le champ identifiant ou identite check-in: 90ff4057b3 user: bohwaz tags: trunk | |
04:29 | Ne pas accepter les noms de champs qui commencent par un chiffre (refusés par SQLite). check-in: 1e224909d5 user: bohwaz tags: trunk | |
04:22 | Rejeter avec un message explicite si on essaye de choisir un numéro de membre qui ne contient pas que des chiffres check-in: 5335b73293 user: bohwaz tags: trunk | |
Changes
Modified src/include/lib/Garradin/Membres/Champs.php from [012e73e8f5] to [da0a542d80].
︙ | ︙ | |||
285 286 287 288 289 290 291 | * Ajouter un nouveau champ * @param string $name Nom du champ * @param array $config Configuration du champ * @return boolean true */ public function add($name, $config) { | | > > > > > | | 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | * Ajouter un nouveau champ * @param string $name Nom du champ * @param array $config Configuration du champ * @return boolean true */ public function add($name, $config) { if (!preg_match('!^[a-z]!', $name)) { throw new UserException('Le nom du champ est invalide : le premier caractère doit être une lettre.'); } if (!preg_match('!^[a-z][a-z0-9]*(_[a-z0-9]+)*$!', $name)) { throw new UserException('Le nom du champ est invalide : ne sont acceptés que les lettres minuscules et les chiffres (éventuellement séparés par un underscore).'); } $this->_checkField($name, $config); $this->champs[$name] = $config; return true; |
︙ | ︙ |