diff --git a/library/Scores/Annonces.php b/library/Scores/Annonces.php index 6cc874965..d224434b2 100644 --- a/library/Scores/Annonces.php +++ b/library/Scores/Annonces.php @@ -21,10 +21,10 @@ class Annonces if (is_array($annonces) && count($annonces)>0) { $this->annonces = $annonces; $this->triAnnonces(); - ksort($this->annoncesBodacc); - ksort($this->annoncesBalo); - ksort($this->annoncesAsso); - ksort($this->annoncesBomp); + krsort($this->annoncesBodacc); + krsort($this->annoncesBalo); + krsort($this->annoncesAsso); + krsort($this->annoncesBomp); } } @@ -336,17 +336,17 @@ class Annonces foreach ($this->annonces as $i => $ann) { //Génération id pour tri - $id = $ann->DateParution.':'.$ann->id; + $id = WDate::dateT('Y-m-d','Ymd',$ann->DateParution).':'.$ann->id; if ($this->isBodacc($ann->BodaccCode)){ - $this->annoncesBodacc[] = $ann; + $this->annoncesBodacc[$id] = $ann; } elseif ($this->isBalo($ann->BodaccCode)) { - $this->annoncesBalo[] = $ann; + $this->annoncesBalo[$id] = $ann; } elseif ($this->isAsso($ann->BodaccCode)) { - $this->annoncesAsso[] = $ann; + $this->annoncesAsso[$id] = $ann; } elseif ($this->isBomp($ann->BodaccCode)){ - $this->annoncesBomp[] = $ann; + $this->annoncesBomp[$id] = $ann; } else { - $this->annoncesBodacc[] = $ann; + $this->annoncesBodacc[$id] = $ann; } } }