Fix: add triggers in task.class.php

Todo: now used task.class.php for create a task
This commit is contained in:
Regis Houssin 2009-11-24 06:51:12 +00:00
parent 1686881f8f
commit eed7546357
2 changed files with 21 additions and 34 deletions

View File

@ -50,7 +50,7 @@ class Project extends CommonObject
/** /**
* \brief Constructeur de la classe * \brief Constructeur de la classe
* \param DB handler acc<EFBFBD>s base de donn<EFBFBD>es * \param DB handler acces base de donnees
*/ */
function Project($DB) function Project($DB)
{ {
@ -304,6 +304,7 @@ class Project extends CommonObject
* \param parent Id task parent * \param parent Id task parent
* \param id_resp Id of responsible user * \param id_resp Id of responsible user
* \return int Task id if succes, <0 if KO * \return int Task id if succes, <0 if KO
* @obsolete now use task.class.php
*/ */
function CreateTask($user, $title, $parent=0, $id_resp=0) function CreateTask($user, $title, $parent=0, $id_resp=0)
{ {

View File

@ -19,16 +19,11 @@
/** /**
* \file task.class.php * \file task.class.php
* \ingroup project * \ingroup project
* \brief This file is a CRUD class file for Taks (Create/Read/Update/Delete) * \brief This file is a CRUD class file for Task (Create/Read/Update/Delete)
* \version $Id$ * \version $Id$
* \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
*/ */
// Put here all includes required by your class file
//require_once(DOL_DOCUMENT_ROOT."/commonobject.class.php");
//require_once(DOL_DOCUMENT_ROOT."/societe.class.php");
//require_once(DOL_DOCUMENT_ROOT."/product.class.php");
/** /**
* \class Projet_task * \class Projet_task
@ -130,15 +125,12 @@ class Task extends CommonObject
if (! $notrigger) if (! $notrigger)
{ {
// Uncomment this and change MYOBJECT to your own tag if you // Call triggers
// want this action call a trigger. include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
//// Call triggers $result=$interface->run_triggers('TASK_CREATE',$this,$user,$langs,$conf);
//include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); if ($result < 0) { $error++; $this->errors=$interface->errors; }
//$interface=new Interfaces($this->db); // End call triggers
//$result=$interface->run_triggers('MYOBJECT_CREATE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
} }
} }
@ -268,15 +260,12 @@ class Task extends CommonObject
{ {
if (! $notrigger) if (! $notrigger)
{ {
// Uncomment this and change MYOBJECT to your own tag if you // Call triggers
// want this action call a trigger. include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
//// Call triggers $result=$interface->run_triggers('TASK_MODIFY',$this,$user,$langs,$conf);
//include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); if ($result < 0) { $error++; $this->errors=$interface->errors; }
//$interface=new Interfaces($this->db); // End call triggers
//$result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
} }
} }
@ -331,15 +320,12 @@ class Task extends CommonObject
{ {
if (! $notrigger) if (! $notrigger)
{ {
// Uncomment this and change MYOBJECT to your own tag if you // Call triggers
// want this action call a trigger. include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
//// Call triggers $result=$interface->run_triggers('TASK_DELETE',$this,$user,$langs,$conf);
//include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php"); if ($result < 0) { $error++; $this->errors=$interface->errors; }
//$interface=new Interfaces($this->db); // End call triggers
//$result=$interface->run_triggers('MYOBJECT_DELETE',$this,$user,$langs,$conf);
//if ($result < 0) { $error++; $this->errors=$interface->errors; }
//// End call triggers
} }
} }