Overview
SHA1:56382af0c1c7c58a44922fddf8d1b313afea75a1
Date: 2013-06-08 08:24:48
User: bohwaz
Comment:Correction recherche numéro téléphone [cd3c4650bf]
Timelines: family | ancestors | descendants | both | stable | 0.5.4
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2013-06-08
09:10
[27a52cdec6] Release 0.5.4 (user: bohwaz, tags: stable, 0.5.4)
08:25
[59f0acd356] Merge stable (user: bohwaz, tags: trunk)
08:24
[56382af0c1] Correction recherche numéro téléphone [cd3c4650bf] (user: bohwaz, tags: stable, 0.5.4)
08:09
[a148b1e08a] Correction bug [edda38ee74], merge dans stable (user: bohwaz, tags: stable)
Changes

Modified include/class.membres.php from [aac365d475] to [894265f106].

265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
...
484
485
486
487
488
489
490













491
492
493
494
495
496
497
                }
                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] = preg_replace('![^\d\+]!', '', $data[$key]);
                }
                elseif ($config['type'] == 'country')
                {
                    $data[$key] = strtoupper(substr($data[$key], 0, 2));
                }
                elseif ($config['type'] == 'checkbox')
                {
................................................................................

        $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







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>







265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
...
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
                }
                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')
                {
................................................................................

        $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






454
455
456
457
458
459
460
461
    }

    static public function checkBIC($bic)
    {
        return preg_match('!^[A-Z]{4}[A-Z]{2}[1-9A-Z]{2}(?:[A-Z\d]{3})?$!', $bic);
    }







    function json_readable_encode($in, $indent = 0, Closure $_escape = null)
    {
        if (__CLASS__ && isset($this))
        {
            $_myself = array($this, __FUNCTION__);
        }
        elseif (__CLASS__)
        {







>
>
>
>
>
>
|







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__)
        {