31,10 → 31,12 |
public function executer() { |
try { |
$observations = $this->chargerObservationsCommentees(); |
$this->formaterObservations($observations); |
$commentaires = $this->chargerCommentairesAjourdhui(); |
$this->formaterCommentaires($commentaires); |
$this->parcourirListeCommentairesEtEnvoyerMessage($this->observations_concernees); |
if(!empty($observations)) { |
$this->formaterObservations($observations); |
$commentaires = $this->chargerCommentairesAjourdhui(); |
$this->formaterCommentaires($commentaires); |
$this->parcourirListeCommentairesEtEnvoyerMessage($this->observations_concernees); |
} |
} catch (Exception $e) { |
$this->traiterErreur($e->getMessage()); |
} |
159,7 → 161,7 |
private function formaterMessagePourAuteur($liste_obs, $auteur) { |
$donnees = array(); |
// copie de la première obs pour en obtenir le nom et prénom de l'auteur |
// (en deux fois pour éviter un warning en mode strict |
// (en deux fois pour éviter un warning en mode strict) |
$valeurs = array_values($liste_obs); |
$premiere_obs = array_shift($valeurs); |
$donnees['liste_observations'] = $liste_obs; |