Gestion du tri
This commit is contained in:
parent
380c119883
commit
f9391e4a31
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user