/[dolibarr]/dolibarr/htdocs/project.class.php
ViewVC logotype

Diff of /dolibarr/htdocs/project.class.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by rodolphe, Sat Aug 20 07:25:50 2005 UTC revision 1.15 by rodolphe, Sat Aug 20 21:45:40 2005 UTC
# Line 340  class Project { Line 340  class Project {
340      $result = 0;      $result = 0;
341      if (trim($title))      if (trim($title))
342        {        {
343          $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet_task (fk_projet, title, fk_user_creat) ";          $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet_task (fk_projet, title, fk_user_creat, fk_task_parent) ";
344          $sql .= " VALUES (".$this->id.",'$title', ".$user->id.") ;";          $sql .= " VALUES (".$this->id.",'$title', ".$user->id.",".$parent.") ;";
345                    
346          if ($this->db->query($sql) )          if ($this->db->query($sql) )
347            {            {
# Line 350  class Project { Line 350  class Project {
350            }            }
351          else          else
352            {            {
353              dolibarr_syslog("Project::CreateTask error -2");              dolibarr_syslog("Project::CreateTask error -2",LOG_ERR);
354                dolibarr_syslog($this->db->error(),LOG_ERR);
355              $this->error=$this->db->error();              $this->error=$this->db->error();
356              $result = -2;              $result = -2;
357            }            }
# Line 367  class Project { Line 368  class Project {
368                }                }
369              else              else
370                {                {
371                  dolibarr_syslog("Project::CreateTask error -3");                  dolibarr_syslog("Project::CreateTask error -3",LOG_ERR);
372                  $this->error=$this->db->error();                  $this->error=$this->db->error();
373                  $result = -2;                  $result = -2;
374                }                }
# Line 389  class Project { Line 390  class Project {
390     *    \param     title      titre de la tāche     *    \param     title      titre de la tāche
391     *    \param      parent   tache parente     *    \param      parent   tache parente
392     */     */
393    function TaskAddTime($user, $task, $time)    function TaskAddTime($user, $task, $time, $date)
394    {    {
395      $result = 0;      $result = 0;
396    
397          $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet_task_time (fk_task, task_date, task_duration, fk_user)";          $sql = "INSERT INTO ".MAIN_DB_PREFIX."projet_task_time (fk_task, task_date, task_duration, fk_user)";
398          $sql .= " VALUES (".$this->id.",'$title', ".$user->id.") ;";          $sql .= " VALUES (".$task.",'".$this->db->idate($date)."',".$time.", ".$user->id.") ;";
399    
400          if ($this->db->query($sql) )          if ($this->db->query($sql) )
401            {            {
# Line 403  class Project { Line 404  class Project {
404            }            }
405          else          else
406            {            {
407              dolibarr_syslog("Project::CreateTask error -2");              dolibarr_syslog("Project::TaskAddTime error -2",LOG_ERR);
408              $this->error=$this->db->error();              $this->error=$this->db->error();
409              $result = -2;              $result = -2;
410            }            }
# Line 421  class Project { Line 422  class Project {
422                }                }
423              else              else
424                {                {
425                  dolibarr_syslog("Project::CreateTask error -3");                  dolibarr_syslog("Project::TaskAddTime error -3",LOG_ERR);
426                  $this->error=$this->db->error();                  $this->error=$this->db->error();
427                  $result = -2;                  $result = -2;
428                }                }

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26