Merge pull request #9491 from frederic34/patch-11
reduce complexity of libstatut expedition.class.php
This commit is contained in:
commit
39419367b6
@ -11,6 +11,7 @@
|
|||||||
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
* Copyright (C) 2015 Claudio Aschieri <c.aschieri@19.coop>
|
||||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||||
|
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -1623,32 +1624,32 @@ class Expedition extends CommonObject
|
|||||||
if ($mode==0)
|
if ($mode==0)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $langs->trans($this->statuts[$statut]);
|
if ($statut==0) return $langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return $langs->trans($this->statuts[$statut]);
|
elseif ($statut==1) return $langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==2) return $langs->trans($this->statuts[$statut]);
|
elseif ($statut==2) return $langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode==1)
|
elseif ($mode==1)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $langs->trans($this->statutshorts[$statut]);
|
if ($statut==0) return $langs->trans($this->statutshorts[$statut]);
|
||||||
if ($statut==1) return $langs->trans($this->statutshorts[$statut]);
|
elseif ($statut==1) return $langs->trans($this->statutshorts[$statut]);
|
||||||
if ($statut==2) return $langs->trans($this->statutshorts[$statut]);
|
elseif ($statut==2) return $langs->trans($this->statutshorts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 3)
|
elseif ($mode == 3)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6');
|
elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6');
|
||||||
}
|
}
|
||||||
if ($mode == 4)
|
elseif ($mode == 4)
|
||||||
{
|
{
|
||||||
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]),'statut0').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]),'statut4').' '.$langs->trans($this->statuts[$statut]);
|
||||||
if ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]);
|
elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]),'statut6').' '.$langs->trans($this->statuts[$statut]);
|
||||||
}
|
}
|
||||||
if ($mode == 5)
|
elseif ($mode == 5)
|
||||||
{
|
{
|
||||||
if ($statut==0) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
if ($statut==0) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut0');
|
||||||
if ($statut==1) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
elseif ($statut==1) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut4');
|
||||||
if ($statut==2) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut6');
|
elseif ($statut==2) return $langs->trans($this->statutshorts[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]),'statut6');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user