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
{
$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;
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.='</option>';
}
$out.= $resultat;

View File

@ -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"))