diff --git a/ChangeLog b/ChangeLog
index 939e7d4109b..90356aa9a63 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -123,7 +123,9 @@ Fix: [ bug #1528 ] Leopard Services numeration module description is not transla
Fix: [ bug #1523 ] suite bug #1334 : filtre et ordre de tri conjoints ne s'appliquent pas
Fix: [ bug #1534 ] Unknown error when deleting a product photo under special circumstances
Fix: Update impayees.php
-Fix: Fix Link product, In list view and label product
+Fix: Link product, In list view and label product
+Fix: visible task into area "time" for "My task" must limit task to tasks i am assigned to.
+Fix: When disabled, all fields to add time into task line must be disabled.
***** ChangeLog for 3.5.4 compared to 3.5.3 *****
Fix: Hide title of event when agenda module disabled.
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index cfa5417584b..56c2bccc830 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -3530,7 +3530,7 @@ if ($action == 'create')
// Linked object block
$somethingshown = $object->showLinkedObjectBlock();
- if (empty($somethingshown) && ! empty($conf->commande->enabled))
+ if (empty($somethingshown) && ! empty($conf->commande->enabled))
{
print '
' . $langs->trans('LinkedOrder') . '';
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index bb6fd5a74fe..bfe782c40f9 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -480,7 +480,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
if (empty($mine) || ! empty($tasksrole[$lines[$i]->id]))
{
print "
\n";
-
+
// Project
print "| ";
$projectstatic->id=$lines[$i]->fk_project;
@@ -489,14 +489,14 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
$projectstatic->label=$langs->transnoentitiesnoconv("YourRole").': '.$projectsrole[$lines[$i]->fk_project];
print $projectstatic->getNomUrl(1);
print " | ";
-
+
// Ref
print '';
$taskstatic->id=$lines[$i]->id;
$taskstatic->ref=$lines[$i]->id;
print $taskstatic->getNomUrl(1);
print ' | ';
-
+
// Label task
print "";
for ($k = 0 ; $k < $level ; $k++)
@@ -507,28 +507,28 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
$taskstatic->ref=$lines[$i]->label;
print $taskstatic->getNomUrl(0);
print " | \n";
-
+
// Date start
print '';
print dol_print_date($lines[$i]->date_start,'dayhour');
print ' | ';
-
+
// Date end
print '';
print dol_print_date($lines[$i]->date_end,'dayhour');
print ' | ';
-
+
// Planned Workload
print '';
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload,'allhourmin');
else print '--:--';
print ' | ';
-
+
// Progress declared %
print '';
print $lines[$i]->progress.' %';
print ' | ';
-
+
// Time spent
print '';
if ($lines[$i]->duration)
@@ -539,7 +539,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
}
else print '--:--';
print " | \n";
-
+
$disabledproject=1;$disabledtask=1;
//print "x".$lines[$i]->fk_project;
//var_dump($lines[$i]);
@@ -555,7 +555,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
{
$disabledtask=1;
}
-
+
print '';
$s =$form->select_date('',$lines[$i]->id,'','','',"addtime",1,0,1,$disabledtask);
$s.=' ';
@@ -567,10 +567,10 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("YouAreNotContactOfProject"));
else if ($disabledtask) print $form->textwithpicto('',$langs->trans("TaskIsNotAffectedToYou"));
print ' | ';
-
+
print "
\n";
}
-
+
$inc++;
$level++;
if ($lines[$i]->id) projectLinesb($inc, $lines[$i]->id, $lines, $level, $projectsrole, $tasksrole, $mine, $restricteditformytask);
diff --git a/htdocs/projet/activity/list.php b/htdocs/projet/activity/list.php
index 09a8f6ed61f..89e23bf6a07 100644
--- a/htdocs/projet/activity/list.php
+++ b/htdocs/projet/activity/list.php
@@ -132,6 +132,9 @@ $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$pr
+llxHeader("",$title,"");
+
+
llxHeader("",$title,"");
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index c2b8b95f608..652119596c3 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -206,9 +206,9 @@ class Project extends CommonObject
$sql.= ", fk_soc = " . ($this->socid > 0 ? $this->socid : "null");
$sql.= ", fk_statut = " . $this->statut;
$sql.= ", public = " . ($this->public ? 1 : 0);
- $sql.= ", datec=" . ($this->date_c != '' ? $this->db->idate($this->date_c) : 'null');
- $sql.= ", dateo=" . ($this->date_start != '' ? $this->db->idate($this->date_start) : 'null');
- $sql.= ", datee=" . ($this->date_end != '' ? $this->db->idate($this->date_end) : 'null');
+ $sql.= ", datec=" . ($this->date_c != '' ? "'".$this->db->idate($this->date_c)."'" : 'null');
+ $sql.= ", dateo=" . ($this->date_start != '' ? "'".$this->db->idate($this->date_start)."'" : 'null');
+ $sql.= ", datee=" . ($this->date_end != '' ? "'".$this->db->idate($this->date_end)."'" : 'null');
$sql.= " WHERE rowid = " . $this->id;
dol_syslog(get_class($this)."::Update sql=" . $sql, LOG_DEBUG);
@@ -265,6 +265,7 @@ class Project extends CommonObject
else
{
$this->error = $this->db->lasterror();
+ $this->errors[] = $this->error;
dol_syslog(get_class($this)."::Update error -2 " . $this->error, LOG_ERR);
$result = -2;
}
@@ -499,10 +500,9 @@ class Project extends CommonObject
$sql = "DELETE FROM " . MAIN_DB_PREFIX . "projet_extrafields";
$sql.= " WHERE fk_object=" . $this->id;
-
dol_syslog(get_class($this) . "::delete sql=" . $sql, LOG_DEBUG);
$resql = $this->db->query($sql);
- if (!$resql)
+ if (! $resql)
{
$this->errors[] = $this->db->lasterror();
$error++;
diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php
index 9d09c7c25c6..53559c74333 100644
--- a/htdocs/projet/element.php
+++ b/htdocs/projet/element.php
@@ -222,13 +222,13 @@ foreach ($listofreferent as $key => $value)
$classname=$value['class'];
$tablename=$value['table'];
$qualified=$value['test'];
-
+
if ($qualified)
{
print '