Qual: Removed errors
This commit is contained in:
parent
e89806aa62
commit
b2c2adf307
@ -50,9 +50,9 @@ class Skeleton_Class // extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDb $DB Database handler
|
* @param DoliDb $DB Database handler
|
||||||
*/
|
*/
|
||||||
function Skeleton_Class($DB)
|
function Skeleton_Class($DB)
|
||||||
{
|
{
|
||||||
@ -62,11 +62,11 @@ class Skeleton_Class // extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create object into database
|
* Create object into database
|
||||||
*
|
*
|
||||||
* @param User $user User that create
|
* @param User $user User that create
|
||||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||||
* @return int <0 if KO, Id of created object if OK
|
* @return int <0 if KO, Id of created object if OK
|
||||||
*/
|
*/
|
||||||
function create($user, $notrigger=0)
|
function create($user, $notrigger=0)
|
||||||
{
|
{
|
||||||
@ -136,10 +136,10 @@ class Skeleton_Class // extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load object in memory from database
|
* Load object in memory from database
|
||||||
*
|
*
|
||||||
* @param int $id Id object
|
* @param int $id Id object
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch($id)
|
function fetch($id)
|
||||||
{
|
{
|
||||||
@ -179,11 +179,11 @@ class Skeleton_Class // extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update object into database
|
* Update object into database
|
||||||
*
|
*
|
||||||
* @param User $user User that modify
|
* @param User $user User that modify
|
||||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function update($user=0, $notrigger=0)
|
function update($user=0, $notrigger=0)
|
||||||
{
|
{
|
||||||
@ -247,11 +247,11 @@ class Skeleton_Class // extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete object in database
|
* Delete object in database
|
||||||
*
|
*
|
||||||
* @param User $user User that delete
|
* @param User $user User that delete
|
||||||
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
* @param int $notrigger 0=launch triggers after, 1=disable triggers
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function delete($user, $notrigger=0)
|
function delete($user, $notrigger=0)
|
||||||
{
|
{
|
||||||
@ -304,10 +304,10 @@ class Skeleton_Class // extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load an object from its id and create a new one in database
|
* Load an object from its id and create a new one in database
|
||||||
*
|
*
|
||||||
* @param int $fromid Id of object to clone
|
* @param int $fromid Id of object to clone
|
||||||
* @return int New id of clone
|
* @return int New id of clone
|
||||||
*/
|
*/
|
||||||
function createFromClone($fromid)
|
function createFromClone($fromid)
|
||||||
{
|
{
|
||||||
@ -359,10 +359,10 @@ class Skeleton_Class // extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initialisz object with example values
|
* Initialise object with example values
|
||||||
* Id must be 0 if object instance is a specimen
|
* Id must be 0 if object instance is a specimen
|
||||||
*
|
*
|
||||||
* @return none
|
* @return void
|
||||||
*/
|
*/
|
||||||
function initAsSpecimen()
|
function initAsSpecimen()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -163,8 +163,8 @@ class Project extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Update a project
|
* Update a project
|
||||||
*
|
*
|
||||||
* @param $user User object of making update
|
* @param User $user User object of making update
|
||||||
* @param $notrigger 1=Disable all triggers
|
* @param int $notrigger 1=Disable all triggers
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function update($user, $notrigger=0)
|
function update($user, $notrigger=0)
|
||||||
@ -284,8 +284,9 @@ class Project extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of projects
|
* Return list of projects
|
||||||
* @param socid To filter on a particular third party
|
*
|
||||||
* @return array Liste of projects
|
* @param int $socid To filter on a particular third party
|
||||||
|
* @return array List of projects
|
||||||
*/
|
*/
|
||||||
function liste_array($socid='')
|
function liste_array($socid='')
|
||||||
{
|
{
|
||||||
@ -324,9 +325,10 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return list of elements for type linked to project
|
* Return list of elements for type linked to project
|
||||||
* \param type 'propal','order','invoice','order_supplier','invoice_supplier'
|
*
|
||||||
* \return array List of orders linked to project, <0 if error
|
* @param string $type 'propal','order','invoice','order_supplier','invoice_supplier'
|
||||||
|
* @return array List of orders linked to project, <0 if error
|
||||||
*/
|
*/
|
||||||
function get_element_list($type)
|
function get_element_list($type)
|
||||||
{
|
{
|
||||||
@ -376,9 +378,10 @@ class Project extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete a project from database
|
* Delete a project from database
|
||||||
* @param user User
|
*
|
||||||
* @param notrigger Disable triggers
|
* @param User $user User
|
||||||
* @return int <0 if KO, 0 if not possible, >0 if OK
|
* @param int $notrigger Disable triggers
|
||||||
|
* @return int <0 if KO, 0 if not possible, >0 if OK
|
||||||
*/
|
*/
|
||||||
function delete($user, $notrigger=0)
|
function delete($user, $notrigger=0)
|
||||||
{
|
{
|
||||||
@ -469,8 +472,9 @@ class Project extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Validate a project
|
* Validate a project
|
||||||
* @param user User that validate
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @param User $user User that validate
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function setValid($user)
|
function setValid($user)
|
||||||
{
|
{
|
||||||
@ -521,8 +525,9 @@ class Project extends CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Close a project
|
* Close a project
|
||||||
* @param user User that validate
|
*
|
||||||
* @return int <0 if KO, >0 if OK
|
* @param User $user User that validate
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function setClose($user)
|
function setClose($user)
|
||||||
{
|
{
|
||||||
@ -573,9 +578,10 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return status label of object
|
* Return status label of object
|
||||||
* \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
*
|
||||||
* \return string Label
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||||
|
* @return string Label
|
||||||
*/
|
*/
|
||||||
function getLibStatut($mode=0)
|
function getLibStatut($mode=0)
|
||||||
{
|
{
|
||||||
@ -583,10 +589,11 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoi status label for a status
|
* Renvoi status label for a status
|
||||||
* \param statut id statut
|
*
|
||||||
* \param mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
* @param int $statut id statut
|
||||||
* \return string Label
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||||
|
* @return string Label
|
||||||
*/
|
*/
|
||||||
function LibStatut($statut,$mode=0)
|
function LibStatut($statut,$mode=0)
|
||||||
{
|
{
|
||||||
@ -627,10 +634,11 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
* Renvoie nom clicable (avec eventuellement le picto)
|
||||||
* \param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
*
|
||||||
* \param option Variante ('', 'nolink')
|
* @param int $withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||||
* \return string Chaine avec URL
|
* @param string $option Variante ('', 'nolink')
|
||||||
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option='')
|
function getNomUrl($withpicto=0,$option='')
|
||||||
{
|
{
|
||||||
@ -658,7 +666,9 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Initialise object with default value to be used as example
|
* Initialise object with default value to be used as example
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function initAsSpecimen()
|
function initAsSpecimen()
|
||||||
{
|
{
|
||||||
@ -734,9 +744,11 @@ class Project extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Check if user has read permission on project
|
* Check if user has read permission on project
|
||||||
* @param user Object user to evaluate
|
*
|
||||||
* @param noprint 0=Print forbidden message if no permission, 1=Return -1 if no permission
|
* @param User $user Object user to evaluate
|
||||||
|
* @param int $noprint 0=Print forbidden message if no permission, 1=Return -1 if no permission
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function restrictedProjectArea($user,$noprint=0)
|
function restrictedProjectArea($user,$noprint=0)
|
||||||
{
|
{
|
||||||
@ -795,11 +807,11 @@ class Project extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return array of projects a user has permission on, is affected to, or all projects
|
* Return array of projects a user has permission on, is affected to, or all projects
|
||||||
*
|
*
|
||||||
* @param user User object
|
* @param User $user User object
|
||||||
* @param mode 0=All project I have permission on, 1=Projects affected to me only, 2=Will return list of all projects with no test on contacts
|
* @param int $mode 0=All project I have permission on, 1=Projects affected to me only, 2=Will return list of all projects with no test on contacts
|
||||||
* @param list 0=Return array,1=Return string list
|
* @param int $list 0=Return array,1=Return string list
|
||||||
* @param socid 0=No filter on third party, id of third party
|
* @param int $socid 0=No filter on third party, id of third party
|
||||||
* @return array or string
|
* @return array Array of projects
|
||||||
*/
|
*/
|
||||||
function getProjectsAuthorizedForUser($user,$mode=0,$list=0,$socid=0)
|
function getProjectsAuthorizedForUser($user,$mode=0,$list=0,$socid=0)
|
||||||
{
|
{
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user