Overview
Comment: | Correction recherche numéro téléphone [cd3c4650bf] |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | stable | 0.5.4 |
Files: | files | file ages | folders |
SHA1: |
56382af0c1c7c58a44922fddf8d1b313 |
User & Date: | bohwaz on 2013-06-08 08:24:48 |
Other Links: | manifest | tags |
Context
2013-06-08
| ||
09:10 | Release 0.5.4 check-in: 27a52cdec6 user: bohwaz tags: stable, 0.5.4 | |
08:25 | Merge stable check-in: 59f0acd356 user: bohwaz tags: trunk | |
08:24 | Correction recherche numéro téléphone [cd3c4650bf] check-in: 56382af0c1 user: bohwaz tags: stable, 0.5.4 | |
08:09 | Correction bug [edda38ee74], merge dans stable check-in: a148b1e08a user: bohwaz tags: stable | |
Changes
Modified include/class.membres.php from [aac365d475] to [894265f106].
︙ | ︙ | |||
265 266 267 268 269 270 271 | } elseif ($config['type'] == 'url' && !filter_var($data[$key], FILTER_VALIDATE_URL)) { throw new UserException('Adresse URL invalide dans le champ "' . $config['title'] . '".'); } elseif ($config['type'] == 'tel') { | | | 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | } elseif ($config['type'] == 'url' && !filter_var($data[$key], FILTER_VALIDATE_URL)) { throw new UserException('Adresse URL invalide dans le champ "' . $config['title'] . '".'); } elseif ($config['type'] == 'tel') { $data[$key] = utils::normalizePhoneNumber($data[$key]); } elseif ($config['type'] == 'country') { $data[$key] = strtoupper(substr($data[$key], 0, 2)); } elseif ($config['type'] == 'checkbox') { |
︙ | ︙ | |||
484 485 486 487 488 489 490 491 492 493 494 495 496 497 | $champ = $champs->get($field); if ($champ['type'] == 'multiple') { $where = 'WHERE '.$field.' & (1 << '.(int)$query.')'; $order = false; } elseif (!$champs->isText($field)) { $where = 'WHERE '.$field.' = \''.$db->escapeString($query).'\''; $order = $field; } else | > > > > > > > > > > > > > | 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 | $champ = $champs->get($field); if ($champ['type'] == 'multiple') { $where = 'WHERE '.$field.' & (1 << '.(int)$query.')'; $order = false; } elseif ($champ['type'] == 'tel') { $query = utils::normalizePhoneNumber($query); $query = preg_replace('!^0+!', '', $query); if ($query == '') { return false; } $where = 'WHERE '.$field.' LIKE \'%'.$db->escapeString($query).'\''; $order = $field; } elseif (!$champs->isText($field)) { $where = 'WHERE '.$field.' = \''.$db->escapeString($query).'\''; $order = $field; } else |
︙ | ︙ |
Modified include/lib.utils.php from [ab237ec0bb] to [78a402f3e6].
︙ | ︙ | |||
447 448 449 450 451 452 453 | } static public function checkBIC($bic) { return preg_match('!^[A-Z]{4}[A-Z]{2}[1-9A-Z]{2}(?:[A-Z\d]{3})?$!', $bic); } | > > > > > > | | 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 | } static public function checkBIC($bic) { return preg_match('!^[A-Z]{4}[A-Z]{2}[1-9A-Z]{2}(?:[A-Z\d]{3})?$!', $bic); } static public function normalizePhoneNumber($n) { $n = preg_replace('![^\d\+]!', '', $n); return $n; } static public function json_readable_encode($in, $indent = 0, Closure $_escape = null) { if (__CLASS__ && isset($this)) { $_myself = array($this, __FUNCTION__); } elseif (__CLASS__) { |
︙ | ︙ |