Merge branch '3.5' of git@github.com:Dolibarr/dolibarr.git into 3.5

This commit is contained in:
Florian HENRY 2014-06-13 14:38:44 +02:00
commit aecede08c4
3 changed files with 10 additions and 8 deletions

View File

@ -195,7 +195,8 @@ else if ($action == 'confirm_validate' && $confirm == 'yes' && $user->rights->pr
else else
{ {
$langs->load("errors"); $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');
} }
} }

View File

@ -77,7 +77,7 @@ class FormProjets
$sql.= " WHERE p.entity = ".$conf->entity; $sql.= " WHERE p.entity = ".$conf->entity;
if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")"; if ($projectsListId !== false) $sql.= " AND p.rowid IN (".$projectsListId.")";
if ($socid == 0) $sql.= " AND (p.fk_soc=0 OR p.fk_soc IS NULL)"; 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); dol_syslog(get_class($this)."::select_projects sql=".$sql,LOG_DEBUG);
$resql=$this->db->query($sql); $resql=$this->db->query($sql);
@ -113,6 +113,7 @@ class FormProjets
else else
{ {
$disabled=0; $disabled=0;
$labeltoshow.=' '.dol_trunc($obj->title,$maxlength);
if (! $obj->fk_statut > 0) if (! $obj->fk_statut > 0)
{ {
$disabled=1; $disabled=1;
@ -134,8 +135,8 @@ class FormProjets
if ($disabled) $resultat.=' disabled="disabled"'; if ($disabled) $resultat.=' disabled="disabled"';
//if ($obj->public) $labeltoshow.=' ('.$langs->trans("Public").')'; //if ($obj->public) $labeltoshow.=' ('.$langs->trans("Public").')';
//else $labeltoshow.=' ('.$langs->trans("Private").')'; //else $labeltoshow.=' ('.$langs->trans("Private").')';
$resultat.='>'.$labeltoshow; $resultat.='>';
if (! $disabled) $resultat.=' - '.dol_trunc($obj->title,$maxlength); $resultat.=$labeltoshow;
$resultat.='</option>'; $resultat.='</option>';
} }
$out.= $resultat; $out.= $resultat;

View File

@ -834,7 +834,7 @@ class Task extends CommonObject
$this->id = $obj->fk_task; $this->id = $obj->fk_task;
$this->timespent_date = $obj->task_date; $this->timespent_date = $obj->task_date;
$this->timespent_duration = $obj->task_duration; $this->timespent_duration = $obj->task_duration;
$this->timespent_user = $obj->fk_user; $this->timespent_fk_user = $obj->fk_user;
$this->timespent_note = $obj->note; $this->timespent_note = $obj->note;
} }