Overview
Comment:Ne pas copier le champ s'il n'existe pas déjà !
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk | stable
Files: files | file ages | folders
SHA1: b85cd942a51b6a2194533e77361b06dde8dfd0d7
User & Date: bohwaz on 2018-02-09 01:12:03
Other Links: manifest | tags
Context
2018-02-09
01:13
Correction typo check-in: 6ccbb8a8e2 user: bohwaz tags: trunk
01:12
Ne pas copier le champ s'il n'existe pas déjà ! check-in: b85cd942a5 user: bohwaz tags: trunk, stable
01:00
Mise à jour dernière date de connexion check-in: 45c49a5080 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';