Skip to content
Snippets Groups Projects
Commit 7ddec85f authored by aspangaro's avatar aspangaro
Browse files

Merge remote-tracking branch 'Upstream/develop' into develop-30

parents a4acc867 bcd254c1
No related branches found
No related tags found
No related merge requests found
<?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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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 ) ...@@ -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";
......
...@@ -116,7 +116,7 @@ if ($action == 'assign') ...@@ -116,7 +116,7 @@ if ($action == 'assign')
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
} }
$action=''; $action='';
} }
...@@ -148,24 +148,24 @@ if ($action == 'addtime' && $user->rights->projet->creer) ...@@ -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;
} }
......
...@@ -134,7 +134,7 @@ if ($action == 'assign') ...@@ -134,7 +134,7 @@ if ($action == 'assign')
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');
} }
} }
$action=''; $action='';
} }
...@@ -162,16 +162,16 @@ if ($action == 'addtime' && $user->rights->projet->creer) ...@@ -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;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment