Commit 29f77089 authored by Mat's avatar Mat

lorsque la séquence de tri des légumes n'a pas été définie (sorted)

parent fd037be3
...@@ -174,6 +174,7 @@ class MembreController extends MasterController ...@@ -174,6 +174,7 @@ class MembreController extends MasterController
*/ */
private function getOffreLegumesSorted(Offre $offre) private function getOffreLegumesSorted(Offre $offre)
{ {
$legumesSorted = array();
$sort = explode(",", $offre->getSorted()); $sort = explode(",", $offre->getSorted());
foreach ($sort as $k => $v) foreach ($sort as $k => $v)
{ {
...@@ -185,6 +186,10 @@ class MembreController extends MasterController ...@@ -185,6 +186,10 @@ class MembreController extends MasterController
} }
} }
} }
if (count($legumesSorted) !== count($offre->getOffreLegumes())) {
$legumesSorted = $offre->getOffreLegumes();
}
return $legumesSorted; return $legumesSorted;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment