From b4ef780274248df2da40aef446e53c8f8e7df388 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jun 2014 15:41:00 +0200 Subject: [PATCH] Fix: When project was disabled, label was not visible --- htdocs/core/class/html.formprojet.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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;