Merge remote-tracking branch 'Upstream/develop' into develop-30
This commit is contained in:
commit
7ddec85fd2
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2006-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2006-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
* Copyright (C) 2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -103,7 +103,8 @@ if ( $resql )
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
$projectstatic->id=$row->rowid;
|
$projectstatic->id=$row->rowid;
|
||||||
$projectstatic->ref=$row->ref;
|
$projectstatic->ref=$row->ref;
|
||||||
print $projectstatic->getNomUrl(1);
|
$projectstatic->title=$row->title;
|
||||||
|
print $projectstatic->getNomUrl(1, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -158,7 +159,8 @@ if ( $resql )
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
$projectstatic->id=$row->rowid;
|
$projectstatic->id=$row->rowid;
|
||||||
$projectstatic->ref=$row->ref;
|
$projectstatic->ref=$row->ref;
|
||||||
print $projectstatic->getNomUrl(1);
|
$projectstatic->title=$row->title;
|
||||||
|
print $projectstatic->getNomUrl(1, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -219,7 +221,8 @@ if ( $resql )
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
$projectstatic->id=$row->rowid;
|
$projectstatic->id=$row->rowid;
|
||||||
$projectstatic->ref=$row->ref;
|
$projectstatic->ref=$row->ref;
|
||||||
print $projectstatic->getNomUrl(1);
|
$projectstatic->title=$row->title;
|
||||||
|
print $projectstatic->getNomUrl(1, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -270,7 +273,8 @@ if ( $resql )
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
$projectstatic->id=$row->rowid;
|
$projectstatic->id=$row->rowid;
|
||||||
$projectstatic->ref=$row->ref;
|
$projectstatic->ref=$row->ref;
|
||||||
print $projectstatic->getNomUrl(1);
|
$projectstatic->title=$row->title;
|
||||||
|
print $projectstatic->getNomUrl(1, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
@ -317,7 +321,8 @@ if ( $resql )
|
|||||||
print '<td>';
|
print '<td>';
|
||||||
$projectstatic->id=$row->rowid;
|
$projectstatic->id=$row->rowid;
|
||||||
$projectstatic->ref=$row->ref;
|
$projectstatic->ref=$row->ref;
|
||||||
print $projectstatic->getNomUrl(1);
|
$projectstatic->title=$row->title;
|
||||||
|
print $projectstatic->getNomUrl(1, '', 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
print '<td align="right">'.convertSecondToTime($row->nb).'</td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|||||||
@ -148,24 +148,24 @@ if ($action == 'addtime' && $user->rights->projet->creer)
|
|||||||
{
|
{
|
||||||
foreach($timespent_duration as $key => $val)
|
foreach($timespent_duration as $key => $val)
|
||||||
{
|
{
|
||||||
$task->fetch($key);
|
$object->fetch($key);
|
||||||
$task->progress = GETPOST($key . 'progress', 'int');
|
$object->progress = GETPOST($key . 'progress', 'int');
|
||||||
$task->timespent_duration = $val;
|
$object->timespent_duration = $val;
|
||||||
$task->timespent_fk_user = $user->id;
|
$object->timespent_fk_user = $user->id;
|
||||||
if (GETPOST($key."hour") != '' && GETPOST($key."hour") >= 0) // If hour was entered
|
if (GETPOST($key."hour") != '' && GETPOST($key."hour") >= 0) // If hour was entered
|
||||||
{
|
{
|
||||||
$task->timespent_date = dol_mktime(GETPOST($key."hour"),GETPOST($key."min"),0,GETPOST($key."month"),GETPOST($key."day"),GETPOST($key."year"));
|
$object->timespent_date = dol_mktime(GETPOST($key."hour"),GETPOST($key."min"),0,GETPOST($key."month"),GETPOST($key."day"),GETPOST($key."year"));
|
||||||
$task->timespent_withhour = 1;
|
$object->timespent_withhour = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$task->timespent_date = dol_mktime(12,0,0,GETPOST($key."month"),GETPOST($key."day"),GETPOST($key."year"));
|
$object->timespent_date = dol_mktime(12,0,0,GETPOST($key."month"),GETPOST($key."day"),GETPOST($key."year"));
|
||||||
}
|
}
|
||||||
|
|
||||||
$result=$task->addTimeSpent($user);
|
$result=$object->addTimeSpent($user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
setEventMessages($task->error, $task->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -162,16 +162,16 @@ if ($action == 'addtime' && $user->rights->projet->creer)
|
|||||||
|
|
||||||
if ($newduration > 0)
|
if ($newduration > 0)
|
||||||
{
|
{
|
||||||
$task->fetch($taskid);
|
$object->fetch($taskid);
|
||||||
$task->progress = GETPOST($taskid . 'progress', 'int');
|
$object->progress = GETPOST($taskid . 'progress', 'int');
|
||||||
$task->timespent_duration = $newduration;
|
$object->timespent_duration = $newduration;
|
||||||
$task->timespent_fk_user = $usertoprocess->id;
|
$object->timespent_fk_user = $usertoprocess->id;
|
||||||
$task->timespent_date = dol_time_plus_duree($firstdaytoshow, $key, 'd');
|
$object->timespent_date = dol_time_plus_duree($firstdaytoshow, $key, 'd');
|
||||||
|
|
||||||
$result=$task->addTimeSpent($user);
|
$result=$object->addTimeSpent($user);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
{
|
{
|
||||||
setEventMessages($task->error, $task->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
$error++;
|
$error++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user