Overview
SHA1:b85cd942a51b6a2194533e77361b06dde8dfd0d7
Date: 2018-02-09 01:12:03
User: bohwaz
Comment:Ne pas copier le champ s'il n'existe pas déjà !
Timelines: family | ancestors | descendants | both | trunk | stable
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2018-02-09
01:13
[6ccbb8a8e2] Correction typo (user: bohwaz, tags: trunk)
01:12
[b85cd942a5] Ne pas copier le champ s'il n'existe pas déjà ! (user: bohwaz, tags: trunk, stable)
01:00
[45c49a5080] Mise à jour dernière date de connexion (user: bohwaz, tags: trunk, stable)
Changes

Modified src/include/lib/Garradin/Membres/Champs.php from [0bbc3fc421] to [880caee707].

515
516
517
518
519
520
521
522
523
524
525
526
527






528
529
530
531
532
533
534

    	// Champs à recopier
    	$copy = [
    		'id' => 'id',
    		'id_categorie' => 'id_categorie',
            'date_connexion' => 'date_connexion',
            'date_inscription' => 'date_inscription',
            'secret_otp' => 'secret_otp',
            'clef_pgp' => 'clef_pgp',
    	];

        $anciens_champs = $config->get('champs_membres');
    	$anciens_champs = is_null($anciens_champs) ? $this->champs : $anciens_champs->getAll();







    	foreach ($this->champs as $key=>$cfg)
    	{
    		if ($cfg->type == 'number' || $cfg->type == 'multiple' || $cfg->type == 'checkbox')
    			$type = 'INTEGER';
    		elseif ($cfg->type == 'file')
    			$type = 'BLOB';







<
<




>
>
>
>
>
>







515
516
517
518
519
520
521


522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538

    	// Champs à recopier
    	$copy = [
    		'id' => 'id',
    		'id_categorie' => 'id_categorie',
            'date_connexion' => 'date_connexion',
            'date_inscription' => 'date_inscription',


    	];

        $anciens_champs = $config->get('champs_membres');
    	$anciens_champs = is_null($anciens_champs) ? $this->champs : $anciens_champs->getAll();

        if (property_exists($anciens_champs, 'secret_otp'))
        {
            $copy['secret_otp'] = 'secret_otp';
            $copy['clef_pgp'] = 'clef_pgp';
        }

    	foreach ($this->champs as $key=>$cfg)
    	{
    		if ($cfg->type == 'number' || $cfg->type == 'multiple' || $cfg->type == 'checkbox')
    			$type = 'INTEGER';
    		elseif ($cfg->type == 'file')
    			$type = 'BLOB';