38 |
// Tableau contenant une partie des métadonnées arrêtés |
// Tableau contenant une partie des métadonnées arrêtés |
39 |
var $metadonneesArrete; |
var $metadonneesArrete; |
40 |
|
|
41 |
|
/** |
42 |
|
* Instance de la classe dossier |
43 |
|
* |
44 |
|
* @var mixed |
45 |
|
*/ |
46 |
|
var $inst_dossier = null; |
47 |
|
|
48 |
var $metadata = array( |
var $metadata = array( |
49 |
"om_fichier_instruction" => array( |
"om_fichier_instruction" => array( |
50 |
"dossier" => "getDossier", |
"dossier" => "getDossier", |
447 |
$form->setType('date_finalisation_courrier', 'date'); |
$form->setType('date_finalisation_courrier', 'date'); |
448 |
// suivi des dates |
// suivi des dates |
449 |
if ($maj == 125) { |
if ($maj == 125) { |
450 |
|
$form->setType('date_evenement', 'hiddenstaticdate'); |
451 |
$form->setType('complement_om_html', 'hiddenstatic'); |
$form->setType('complement_om_html', 'hiddenstatic'); |
452 |
$form->setType('complement2_om_html', 'hiddenstatic'); |
$form->setType('complement2_om_html', 'hiddenstatic'); |
453 |
$form->setType('complement3_om_html', 'hiddenstatic'); |
$form->setType('complement3_om_html', 'hiddenstatic'); |
2548 |
|
|
2549 |
//Si il y a un résultat |
//Si il y a un résultat |
2550 |
if ($row !== null) { |
if ($row !== null) { |
2551 |
|
|
2552 |
//Génération du numéro de version |
// Instrance de la classe dossier |
2553 |
$sql = "SELECT |
$inst_dossier = $this->get_inst_dossier($dossier); |
2554 |
count(*) |
|
2555 |
FROM |
// Insère l'attribut version à l'objet |
2556 |
".DB_PREFIXE."dossier |
$row->version = $inst_dossier->get_dossier_instruction_version(); |
|
LEFT JOIN |
|
|
".DB_PREFIXE."dossier_autorisation |
|
|
ON |
|
|
dossier_autorisation.dossier_autorisation = dossier.dossier_autorisation |
|
|
LEFT JOIN |
|
|
".DB_PREFIXE."dossier_instruction_type |
|
|
ON |
|
|
dossier_instruction_type.dossier_instruction_type = dossier.dossier_instruction_type |
|
|
WHERE |
|
|
dossier_autorisation.dossier_autorisation = '".$row->dossier_autorisation."' |
|
|
AND |
|
|
dossier_instruction_type.code = '".$row->dossier_instruction_type."'"; |
|
|
$row->version = $this->db->getOne($sql); |
|
|
$this->f->addToLog("getSpecificMetadata(): db->getOne(\"".$sql."\")", VERBOSE_MODE); |
|
|
if ( database::isError($row->version)){ |
|
|
$this->f->addToError("", $row->version, $row->version); |
|
|
return false; |
|
|
} |
|
|
|
|
|
//Formatage du numéro de version |
|
|
$row->version = str_pad($row->version, 2, "0", STR_PAD_LEFT); |
|
2557 |
|
|
2558 |
//Alors on créé l'objet dossier_instruction |
//Alors on créé l'objet dossier_instruction |
2559 |
$this->specificMetadata = $row; |
$this->specificMetadata = $row; |
4717 |
} |
} |
4718 |
|
|
4719 |
/** |
/** |
4720 |
|
* Récupère l'instance du dossier d'instruction |
4721 |
|
* |
4722 |
|
* @param mixed Identifiant du dossier d'instruction |
4723 |
|
* |
4724 |
|
* @return object |
4725 |
|
*/ |
4726 |
|
function get_inst_dossier($dossier = null) { |
4727 |
|
// |
4728 |
|
return $this->get_inst_common("dossier", $dossier); |
4729 |
|
} |
4730 |
|
|
4731 |
|
/** |
4732 |
* Logue l'action de l'instruction dans son DI |
* Logue l'action de l'instruction dans son DI |
4733 |
* @param string $action ajouter/modifer/supprimer |
* @param string $action ajouter/modifer/supprimer |
4734 |
* @param string $id clé primaire de l'instruction |
* @param string $id clé primaire de l'instruction |
4752 |
), |
), |
4753 |
); |
); |
4754 |
// Ajout du log |
// Ajout du log |
4755 |
require_once "../obj/dossier_instruction.class.php"; |
$di = $this->get_inst_common("dossier", $val['dossier']); |
|
$di = new dossier_instruction($val['dossier'], $this->db, DEBUG); |
|
4756 |
$ret = $di->add_log_instructions($log); |
$ret = $di->add_log_instructions($log); |
4757 |
if ($ret === false) { |
if ($ret === false) { |
4758 |
$this->correct = false; |
$this->correct = false; |