From 1ba02185e5b47d223242509e2979cb7a08806c75 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jun 2014 15:32:25 +0200 Subject: [PATCH 1/3] Fix: Error nor reported --- htdocs/comm/propal.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index f57778a42a4..a4d984951cd 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -195,7 +195,8 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->pr else { $langs->load("errors"); - setEventMessage($langs->trans($object->error), 'errors'); + if (count($object->errors) > 0) setEventMessage($object->errors, 'errors'); + else setEventMessage($langs->trans($object->error), 'errors'); } } From b4ef780274248df2da40aef446e53c8f8e7df388 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jun 2014 15:41:00 +0200 Subject: [PATCH 2/3] 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; From 1a9e53e21f3d804647ca50d11e60eee7143992d0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 12 Jun 2014 22:00:16 +0200 Subject: [PATCH 3/3] Fxi: Correct property name --- htdocs/projet/class/task.class.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index 7b21cbf57d0..93fd2ac6b6d 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -141,7 +141,7 @@ class Task extends CommonObject // End call triggers } } - + //Update extrafield if (!$error) { if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used @@ -311,7 +311,7 @@ class Task extends CommonObject // End call triggers } } - + //Update extrafield if (!$error) { if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) // For avoid conflicts if trigger used @@ -834,7 +834,7 @@ class Task extends CommonObject $this->id = $obj->fk_task; $this->timespent_date = $obj->task_date; $this->timespent_duration = $obj->task_duration; - $this->timespent_user = $obj->fk_user; + $this->timespent_fk_user = $obj->fk_user; $this->timespent_note = $obj->note; } @@ -1018,7 +1018,7 @@ class Task extends CommonObject // Load source object $clone_task->fetch($fromid); $origin_task->fetch($fromid); - + $defaultref=''; $obj = empty($conf->global->PROJECT_TASK_ADDON)?'mod_task_simple':$conf->global->PROJECT_TASK_ADDON; if (! empty($conf->global->PROJECT_TASK_ADDON) && is_readable(DOL_DOCUMENT_ROOT ."/core/modules/project/task/".$conf->global->PROJECT_TASK_ADDON.".php"))