diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 2c371d4afcd..e090f2f6824 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -77,7 +77,7 @@ class FormProjets
$sql.= " WHERE p.entity = ".$conf->entity;
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)";
- $sql.= " ORDER BY p.title ASC";
+ $sql.= " ORDER BY p.ref ASC";
dol_syslog(get_class($this)."::select_projects sql=".$sql,LOG_DEBUG);
$resql=$this->db->query($sql);
@@ -113,6 +113,7 @@ class FormProjets
else
{
$disabled=0;
+ $labeltoshow.=' '.dol_trunc($obj->title,$maxlength);
if (! $obj->fk_statut > 0)
{
$disabled=1;
@@ -134,8 +135,8 @@ class FormProjets
if ($disabled) $resultat.=' disabled="disabled"';
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("Public").')';
//else $labeltoshow.=' ('.$langs->trans("Private").')';
- $resultat.='>'.$labeltoshow;
- if (! $disabled) $resultat.=' - '.dol_trunc($obj->title,$maxlength);
+ $resultat.='>';
+ $resultat.=$labeltoshow;
$resultat.='';
}
$out.= $resultat;