X-Git-Url: http://git.cyclocoop.org/?p=ptitvelo%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Faction%2Fediter_objet.php;h=7fcf0f49ae2c61dc021519d79939289d3716bf9c;hp=cc5658f0e525f9249f9268b2f342dcbde77367a0;hb=f489d45ae677afde12ba9c9f70f463ea34787b45;hpb=0dda6af18a04031b1ca8e217187966077e752fe3 diff --git a/www/ecrire/action/editer_objet.php b/www/ecrire/action/editer_objet.php index cc5658f..7fcf0f4 100644 --- a/www/ecrire/action/editer_objet.php +++ b/www/ecrire/action/editer_objet.php @@ -178,8 +178,14 @@ function objet_inserer($objet, $id_parent=null, $set=null) { $champs['langue_choisie'] = 'non'; } - if (isset($desc['field']['statut'])) - $champs['statut'] = 'prepa'; + if (isset($desc['field']['statut'])){ + if (isset($desc['statut_textes_instituer'])){ + $champs['statut'] = reset(array_keys($desc['statut_textes_instituer'])); + } + else + $champs['statut'] = 'prepa'; + } + if ((isset($desc['date']) AND $d=$desc['date']) OR isset($desc['field'][$d='date'])) $champs[$d] = date('Y-m-d H:i:s');