diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index f72620ce790..f02565209c3 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -252,6 +252,7 @@ function select_projects($socid=-1, $selected='', $htmlname='projectid')
/**
* Output a task line
+ *
* @param $inc
* @param $parent
* @param $lines
@@ -287,7 +288,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $
$lastprojectid=$lines[$i]->fk_project;
}
- print "
\n";
+ print "
\n";
// Project
print "| ";
@@ -366,6 +367,7 @@ function PLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksrole, $
/**
* Show task lines with a particular parent
+ *
* @param $inc Counter that count number of lines legitimate to show (for return)
* @param $parent Id of parent task to start
* @param $lines Array of all tasks
@@ -512,6 +514,7 @@ function PLines(&$inc, $parent, &$lines, &$level, $var, $showproject, &$taskrole
if ($total>0)
{
print ' |
| '.$langs->trans("Total").' | ';
+ if ($showproject) print ' | ';
print ' | ';
print ' | ';
print ''.ConvertSecondToTime($total).' |
';
diff --git a/htdocs/projet/activity/list.php b/htdocs/projet/activity/list.php
index 1a15568dc90..5968ee6d6ca 100644
--- a/htdocs/projet/activity/list.php
+++ b/htdocs/projet/activity/list.php
@@ -32,7 +32,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/date.lib.php");
$langs->load('projects');
-$mode=$_REQUEST["mode"];
+$mode=GETPOST("mode");
$mine=0;
if ($mode == 'mine') $mine=1;
@@ -45,6 +45,7 @@ $socid=0;
if ($user->societe_id > 0) $socid=$user->societe_id;
$result = restrictedArea($user, 'projet', $projectid);
+
/*
* Actions
*/
@@ -80,6 +81,10 @@ if ($_POST["action"] == 'addtime' && $user->rights->projet->creer)
$task->timespent_fk_user = $user->id;
$task->timespent_date = dol_mktime(12,0,0,$_POST["{$id}month"],$_POST["{$id}day"],$_POST["{$id}year"]);
$task->addTimeSpent($user);
+
+ // header to avoid submit twice on back
+ header('Location: '.$_SERVER["PHP_SELF"].'?id='.$projectid);
+ exit;
}
else
{
@@ -121,7 +126,8 @@ $tasksrole=$taskstatic->getUserRolesForProjectsOrTasks(0,$user,($project->id?$pr
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
-if ($mesg) print $mesg;
+
+dol_htmloutput_mesg($mesg);
print '';
print "";
print '';
-$db->close();
-
llxFooter();
+
+$db->close();
?>