Fix and restore a lot of broken features in the project module. Must try to restore a stable module to start a release.
This commit is contained in:
parent
3386c7a17a
commit
ad308ad087
@ -106,18 +106,12 @@ if ($_GET["id"])
|
|||||||
$project->societe->fetch($project->societe->id);
|
$project->societe->fetch($project->societe->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Fiche projet en mode visu
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
||||||
|
|
||||||
if ($mesg) print $mesg;
|
if ($mesg) print $mesg;
|
||||||
|
|
||||||
$tasksrole=$task->getTasksRoleForUser($user);
|
$tasksarray=$task->getTasksArray(0,0,$project->id,0);
|
||||||
$tasksarray=$task->getTasksArray(0,0);
|
$tasksrole=$task->getTasksForProjectOwnedByAUser($user,0,$project->id,0);
|
||||||
//var_dump($tasksarray);
|
//var_dump($tasksarray);
|
||||||
|
|
||||||
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">';
|
print '<form name="addtime" method="POST" action="'.$_SERVER["PHP_SELF"].'?id='.$project->id.'">';
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -38,6 +38,9 @@ $projectid=isset($_REQUEST["id"])?$_REQUEST["id"]:$_POST["id"];
|
|||||||
if ($user->societe_id) $socid=$user->societe_id;
|
if ($user->societe_id) $socid=$user->societe_id;
|
||||||
$result = restrictedArea($user, 'projet', $projectid);
|
$result = restrictedArea($user, 'projet', $projectid);
|
||||||
|
|
||||||
|
$userAccess=0;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
@ -122,7 +125,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$userAccess = $project->restrictedProjectArea($user);
|
$userAccess = $project->restrictedProjectArea($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($_GET["action"] == 'create' && $user->rights->projet->task->creer && $userAccess)
|
if ($_GET["action"] == 'create' && $user->rights->projet->task->creer && (empty($project->societe->id) || $userAccess))
|
||||||
{
|
{
|
||||||
print_fiche_titre($langs->trans("NewTask"));
|
print_fiche_titre($langs->trans("NewTask"));
|
||||||
|
|
||||||
@ -141,7 +144,7 @@ if ($_GET["action"] == 'create' && $user->rights->projet->task->creer && $userAc
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
|
print '<tr><td>'.$langs->trans("ChildOfTask").'</td><td>';
|
||||||
print $formother->selectProjectTasks('',$projectid, 'task_parent', $user->admin?0:1, 0);
|
print $formother->selectProjectTasks('',$projectid, 'task_parent', 0, 0, 1);
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
|
print '<tr><td>'.$langs->trans("AffectedTo").'</td><td>';
|
||||||
@ -169,14 +172,14 @@ if ($_GET["action"] == 'create' && $user->rights->projet->task->creer && $userAc
|
|||||||
print '<textarea name="description" wrap="soft" cols="80" rows="'.ROWS_3.'"></textarea>';
|
print '<textarea name="description" wrap="soft" cols="80" rows="'.ROWS_3.'"></textarea>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
$tasksarray=$task->getTasksArray(0, $user, 1);
|
//$tasksarray=$task->getTasksArray(0, $user, $projectid, 0, 1); // Check
|
||||||
|
|
||||||
print '<tr><td colspan="2" align="center">';
|
print '<tr><td colspan="2" align="center">';
|
||||||
if (sizeof($tasksarray))
|
//if (sizeof($tasksarray))
|
||||||
{
|
//{
|
||||||
print '<input type="submit" class="button" name="add" value="'.$langs->trans("Add").'">';
|
print '<input type="submit" class="button" name="add" value="'.$langs->trans("Add").'">';
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
//}
|
||||||
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
print '<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
@ -246,6 +249,10 @@ else
|
|||||||
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('AddTask').'</a>';
|
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NotOwnerOfProject").'">'.$langs->trans('AddTask').'</a>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
print '<a class="butActionRefused" href="#" title="'.$langs->trans("NoPermission").'">'.$langs->trans('AddTask').'</a>';
|
||||||
|
}
|
||||||
|
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
@ -254,9 +261,9 @@ else
|
|||||||
// Get list of tasks in tasksarray and taskarrayfiltered
|
// Get list of tasks in tasksarray and taskarrayfiltered
|
||||||
// We need all tasks (even not limited to a user because a task to user
|
// We need all tasks (even not limited to a user because a task to user
|
||||||
// can have a parent that is not affected to him).
|
// can have a parent that is not affected to him).
|
||||||
$tasksarray=$task->getTasksArray(0, 0, $project->id);
|
$tasksarray=$task->getTasksArray(0, 0, $project->id, $socid, 0);
|
||||||
// We load also tasks limited to a particular user
|
// We load also tasks limited to a particular user
|
||||||
$tasksrole=($_REQUEST["mode"]=='mine' ? $task->getTasksRoleForUser($user,$project->id) : '');
|
$tasksrole=($_REQUEST["mode"]=='mine' ? $task->getTasksForProjectOwnedByAUser(0,$user,$project->id,0) : '');
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -48,13 +48,23 @@ $page = $page == -1 ? 0 : $page;
|
|||||||
* View
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$form=new Form($db);
|
|
||||||
|
|
||||||
$title=$langs->trans("Tasks");
|
$title=$langs->trans("Tasks");
|
||||||
if ($mode == 'mine') $title=$langs->trans("MyTasks");
|
if ($mode == 'mine') $title=$langs->trans("MyTasks");
|
||||||
|
|
||||||
llxHeader("",$title,"Projet");
|
llxHeader("",$title,"Projet");
|
||||||
|
|
||||||
|
$form=new Form($db);
|
||||||
|
|
||||||
|
$project = new Project($db);
|
||||||
|
$task = new Task($db);
|
||||||
|
|
||||||
|
if ($_GET["id"])
|
||||||
|
{
|
||||||
|
$project->fetch($_GET["id"]);
|
||||||
|
$project->societe->fetch($project->societe->id);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], "", $sortfield, $sortorder, "", $num);
|
||||||
|
|
||||||
@ -65,10 +75,9 @@ $task = new Task($db);
|
|||||||
// Get list of tasks in tasksarray and taskarrayfiltered
|
// Get list of tasks in tasksarray and taskarrayfiltered
|
||||||
// We need all tasks (even not limited to a user because a task to user
|
// We need all tasks (even not limited to a user because a task to user
|
||||||
// can have a parent that is not affected to him).
|
// can have a parent that is not affected to him).
|
||||||
$tasksarray=$task->getTasksArray(0, 0, 0, $socid);
|
$tasksarray=$task->getTasksArray(0, 0, $project->id, $socid);
|
||||||
// We load also tasks limited to a particular user
|
// We load also tasks limited to a particular user
|
||||||
$tasksrole = $task->getTasksRoleForUser($user);
|
$tasksrole=($_REQUEST["mode"]=='mine' ? $task->getTasksForProjectOwnedByAUser(0,$user,$project->id,0) : '');
|
||||||
$tasksrole=($_REQUEST["mode"]=='mine' ? $task->getTasksRoleForUser($user) : '');
|
|
||||||
|
|
||||||
print '<table class="noborder" width="100%">';
|
print '<table class="noborder" width="100%">';
|
||||||
print '<tr class="liste_titre">';
|
print '<tr class="liste_titre">';
|
||||||
|
|||||||
@ -27,8 +27,8 @@
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class Projet_task
|
* \class Task
|
||||||
* \brief Put here description of your class
|
* \brief Class to manage tasks
|
||||||
* \remarks Initialy built by build_class_from_table on 2008-09-10 12:41
|
* \remarks Initialy built by build_class_from_table on 2008-09-10 12:41
|
||||||
*/
|
*/
|
||||||
class Task extends CommonObject
|
class Task extends CommonObject
|
||||||
@ -425,51 +425,91 @@ class Task extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return list of task for all projects or a particular project
|
* Return list of task for all projects or a particular project
|
||||||
* Sort order is on project, TODO then of position of task, and last on title of first level task
|
* Sort order is on project, TODO then of position of task, and last on title of first level task
|
||||||
* @param usert Object user to limit task affected to a particular user
|
* @param usert Object user to limit task affected to a particular user
|
||||||
* @param userp Object user to limit projects of a particular user
|
* @param userp Object user to limit projects of a particular user and public projects
|
||||||
* @param mode 0=Return list of tasks and their projects, 1=Return projects and tasks if exists
|
* @param projectid Project id
|
||||||
* @return array Array of tasks
|
* @param socid Third party id
|
||||||
|
* @param mode 0=Return list of tasks and their projects, 1=Return projects and tasks if exists
|
||||||
|
* @return array Array of tasks
|
||||||
*/
|
*/
|
||||||
function getTasksArray($usert=0, $userp=0, $projectid=0, $socid=0)
|
function getTasksArray($usert=0, $userp=0, $projectid=0, $socid=0, $mode=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$tasks = array();
|
$tasks = array();
|
||||||
|
|
||||||
//print $usert.'-'.$userp.'<br>';
|
//print $usert.'-'.$userp.'-'.$projectid.'-'.$socid.'-'.$mode.'<br>';
|
||||||
|
|
||||||
// List of tasks
|
// List of tasks
|
||||||
$sql = "SELECT p.rowid as projectid, p.ref, p.title as plabel";
|
$sql = "SELECT p.rowid as projectid, p.ref, p.title as plabel, p.public,";
|
||||||
$sql.= ", t.rowid, t.label, t.description, t.fk_task_parent, t.duration_effective";
|
$sql.= " t.rowid, t.label, t.fk_task_parent, t.duration_effective";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet_task as t";
|
if ($mode == 0)
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."projet as p";
|
{
|
||||||
$sql.= " WHERE t.fk_projet = p.rowid";
|
$sql.= " FROM (".MAIN_DB_PREFIX."projet as p, ".MAIN_DB_PREFIX."projet_task as t)";
|
||||||
$sql.= " AND p.entity = ".$conf->entity;
|
/*if (is_object($userp) && $userp->id) // Limit to projects affected to a user
|
||||||
if ($socid) $sql.= " AND p.fk_soc = ".$socid;
|
{
|
||||||
if ($projectid) $sql.= " AND t.fk_projet =".$projectid;
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact as ec ON ec.element_id = p.rowid";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON ec.fk_c_type_contact = tc.rowid";
|
||||||
|
}
|
||||||
|
if (is_object($usert) && $usert->id) // Limit to tasks affected to a user
|
||||||
|
{
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact as ec ON ec.element_id = t.rowid";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON ec.fk_c_type_contact = tc.rowid";
|
||||||
|
}*/
|
||||||
|
$sql.= " WHERE t.fk_projet = p.rowid";
|
||||||
|
$sql.= " AND p.entity = ".$conf->entity;
|
||||||
|
if ($socid) $sql.= " AND p.fk_soc = ".$socid;
|
||||||
|
if ($projectid) $sql.= " AND p.rowid =".$projectid;
|
||||||
|
/*if (is_object($userp)) $sql .= " AND (p.public=1 OR (ec.fk_socpeople = ".$userp->id." AND tc.active = 1 AND tc.source = 'internal' AND tc.element='project'))";
|
||||||
|
if (is_object($usert)) $sql .= " AND (p.public=1 OR (ec.fk_socpeople = ".$usert->id." AND tc.active = 1 AND tc.source = 'internal' AND tc.element='project_task'))";
|
||||||
|
*/
|
||||||
|
}
|
||||||
|
if ($mode == 1)
|
||||||
|
{
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."projet as p";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."projet_task as t on t.fk_projet = p.rowid";
|
||||||
|
/*if (is_object($userp) && $userp->id) // Limit to projects affected to a user
|
||||||
|
{
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact as ec ON ec.element_id = p.rowid";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON ec.fk_c_type_contact = tc.rowid";
|
||||||
|
}
|
||||||
|
if (is_object($usert) && $usert->id) // Limit to tasks affected to a user
|
||||||
|
{
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."element_contact as ec ON ec.element_id = t.rowid";
|
||||||
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_type_contact as tc ON ec.fk_c_type_contact = tc.rowid";
|
||||||
|
}*/
|
||||||
|
$sql.= " WHERE p.entity = ".$conf->entity;
|
||||||
|
if ($socid) $sql.= " AND p.fk_soc = ".$socid;
|
||||||
|
if ($projectid) $sql.= " AND p.rowid =".$projectid;
|
||||||
|
/*if (is_object($userp) && $userp->id) $sql .= " AND (p.public=1 OR (ec.fk.socpeople = ".$userp->id." AND tc.active = 1 AND tc.source = 'internal' AND tc.element='project'))";
|
||||||
|
if (is_object($usert) && $usert->id) $sql .= " AND (p.public=1 OR (ec.fk.socpeople = ".$usert->id." AND tc.active = 1 AND tc.source = 'internal' AND tc.element='project_task'))";
|
||||||
|
*/
|
||||||
|
}
|
||||||
$sql.= " ORDER BY p.ref, t.label";
|
$sql.= " ORDER BY p.ref, t.label";
|
||||||
|
|
||||||
dol_syslog("Project::getTasksArray sql=".$sql, LOG_DEBUG);
|
//print $sql;
|
||||||
|
dol_syslog("Task::getTasksArray sql=".$sql, LOG_DEBUG);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
$num = $this->db->num_rows($resql);
|
$num = $this->db->num_rows($resql);
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
// Loop on each record found, so each couple (project id, task id)
|
||||||
while ($i < $num)
|
while ($i < $num)
|
||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
$obj = $this->db->fetch_object($resql);
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
if ($usert || $userp)
|
if ((! $obj->public) && ($userp || $usert)) // If not public and we ask a filter on user
|
||||||
{
|
{
|
||||||
if (! $this->getTasksRoleForUser($usert?$usert:$userp,$userp?$obj->projectid:0,$usert?$obj->rowid:0))
|
if (! $this->getTasksForProjectOwnedByAUser($userp, $usert, $obj->projectid, $obj->rowid))
|
||||||
{
|
{
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$tasks[$i]->id = $obj->rowid;
|
$tasks[$i]->id = $obj->rowid;
|
||||||
$tasks[$i]->projectid = $obj->projectid;
|
$tasks[$i]->projectid = $obj->projectid;
|
||||||
@ -494,27 +534,49 @@ class Task extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return array of role of user for each projects or tasks
|
* Return Array of role of user for each projects or each tasks
|
||||||
*
|
* @param userp
|
||||||
* @param unknown_type $user
|
* @param usert
|
||||||
* @return unknown
|
* @param projectid
|
||||||
|
* @param taskid
|
||||||
|
* @return array Array of role of user for each projects or each tasks
|
||||||
*/
|
*/
|
||||||
function getTasksRoleForUser($user,$projectid=0,$taskid=0)
|
function getTasksForProjectOwnedByAUser($userp,$usert,$projectid=0,$taskid=0)
|
||||||
{
|
{
|
||||||
$tasksrole = array();
|
$tasksrole = array();
|
||||||
|
|
||||||
|
// We want role of user for projet or role of user for task. Both are not possible.
|
||||||
|
if (empty($userp) && empty($usert))
|
||||||
|
{
|
||||||
|
$this->error="CallWithWrongParameters";
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
/* Liste des taches et role sur la tache du user courant dans $tasksrole */
|
/* Liste des taches et role sur la tache du user courant dans $tasksrole */
|
||||||
$sql = "SELECT ec.element_id, ctc.code";
|
$sql = "SELECT ec.element_id, ctc.code";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."projet_task as pt";
|
if ($userp) $sql.= " FROM ".MAIN_DB_PREFIX."projet as pt";
|
||||||
|
if ($usert) $sql.= " FROM ".MAIN_DB_PREFIX."projet_task as pt";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."element_contact as ec";
|
$sql.= ", ".MAIN_DB_PREFIX."element_contact as ec";
|
||||||
$sql.= ", ".MAIN_DB_PREFIX."c_type_contact as ctc";
|
$sql.= ", ".MAIN_DB_PREFIX."c_type_contact as ctc";
|
||||||
$sql.= " WHERE pt.rowid = ec.element_id";
|
$sql.= " WHERE pt.rowid = ec.element_id";
|
||||||
$sql.= " AND ctc.element = '".$this->element."'";
|
if ($userp) $sql.= " AND ctc.element = 'project'";
|
||||||
|
if ($usert) $sql.= " AND ctc.element = 'project_task'";
|
||||||
$sql.= " AND ctc.rowid = ec.fk_c_type_contact";
|
$sql.= " AND ctc.rowid = ec.fk_c_type_contact";
|
||||||
$sql.= " AND ec.fk_socpeople = ".$user->id;
|
if ($userp) $sql.= " AND ec.fk_socpeople = ".$userp->id;
|
||||||
if ($projectid) $sql.= " AND pt.fk_projet = ".$projectid;
|
if ($usert) $sql.= " AND ec.fk_socpeople = ".$usert->id;
|
||||||
if ($taskid) $sql.= " AND pt.rowid = ".$taskid;
|
$sql.= " AND ec.statut = 4";
|
||||||
|
if ($projectid)
|
||||||
|
{
|
||||||
|
if ($userp) $sql.= " AND pt.rowid = ".$projectid;
|
||||||
|
if ($usert) $sql.= " AND pt.fk_projet = ".$projectid;
|
||||||
|
}
|
||||||
|
if ($taskid)
|
||||||
|
{
|
||||||
|
if ($userp) $sql.= " ERROR SHOULD NOT HAPPEN ";
|
||||||
|
if ($usert) $sql.= " AND pt.rowid = ".$projectid;
|
||||||
|
}
|
||||||
|
|
||||||
|
dol_syslog("Task::getTasksForProjectOwnedByAUser sql=".$sql);
|
||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql)
|
if ($resql)
|
||||||
{
|
{
|
||||||
@ -526,7 +588,7 @@ class Task extends CommonObject
|
|||||||
$tasksrole[$row[0]] = $row[1];
|
$tasksrole[$row[0]] = $row[1];
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
$this->db->free();
|
$this->db->free($resql);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -558,7 +620,7 @@ class Task extends CommonObject
|
|||||||
$sql.= ", ".$user->id;
|
$sql.= ", ".$user->id;
|
||||||
$sql.= ")";
|
$sql.= ")";
|
||||||
|
|
||||||
dol_syslog("Project::addTimeSpent sql=".$sql, LOG_DEBUG);
|
dol_syslog("Task::addTimeSpent sql=".$sql, LOG_DEBUG);
|
||||||
if ($this->db->query($sql) )
|
if ($this->db->query($sql) )
|
||||||
{
|
{
|
||||||
$task_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task");
|
$task_id = $this->db->last_insert_id(MAIN_DB_PREFIX."projet_task");
|
||||||
@ -567,7 +629,7 @@ class Task extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->lasterror();
|
$this->error=$this->db->lasterror();
|
||||||
dol_syslog("Project::addTimeSpent error -2 ".$this->error,LOG_ERR);
|
dol_syslog("Task::addTimeSpent error -2 ".$this->error,LOG_ERR);
|
||||||
$result = -2;
|
$result = -2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -585,7 +647,7 @@ class Task extends CommonObject
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
$this->error=$this->db->lasterror();
|
$this->error=$this->db->lasterror();
|
||||||
dol_syslog("Project::addTimeSpent error -3 ".$this->error, LOG_ERR);
|
dol_syslog("Task::addTimeSpent error -3 ".$this->error, LOG_ERR);
|
||||||
$result = -2;
|
$result = -2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user