Add code comments
This commit is contained in:
parent
bd68cfaf98
commit
cbc3d08106
@ -728,9 +728,8 @@ class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Update a line to have a lower rank
|
||||||
* Enter description here ...
|
* @param $rowid
|
||||||
* @param unknown_type $rowid
|
|
||||||
*/
|
*/
|
||||||
function line_up($rowid)
|
function line_up($rowid)
|
||||||
{
|
{
|
||||||
@ -744,9 +743,8 @@ class CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
* Update a line to have a higher rank
|
||||||
* Enter description here ...
|
* @param $rowid
|
||||||
* @param unknown_type $rowid
|
|
||||||
*/
|
*/
|
||||||
function line_down($rowid)
|
function line_down($rowid)
|
||||||
{
|
{
|
||||||
@ -829,7 +827,7 @@ class CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get position of line (rang)
|
* Get position of line (rang)
|
||||||
* @result int Value of rang in table of lines
|
* @return int Value of rang in table of lines
|
||||||
*/
|
*/
|
||||||
function getRangOfLine($rowid)
|
function getRangOfLine($rowid)
|
||||||
{
|
{
|
||||||
@ -845,7 +843,7 @@ class CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get rowid of the line relative to its position
|
* Get rowid of the line relative to its position
|
||||||
* @result int Rowid of the line
|
* @return int Rowid of the line
|
||||||
*/
|
*/
|
||||||
function getIdOfLine($rang)
|
function getIdOfLine($rang)
|
||||||
{
|
{
|
||||||
@ -1204,6 +1202,37 @@ class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load type of canvas of an object
|
||||||
|
* @param id element id
|
||||||
|
*/
|
||||||
|
function getCanvas($id)
|
||||||
|
{
|
||||||
|
global $conf;
|
||||||
|
|
||||||
|
$sql = "SELECT rowid, canvas";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||||
|
$sql.= " WHERE entity = ".$conf->entity;
|
||||||
|
$sql.= " AND rowid = ".$id;
|
||||||
|
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
|
$this->id = $obj->rowid;
|
||||||
|
$this->canvas = $obj->canvas;
|
||||||
|
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($this->db);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiate hooks of thirdparty module
|
* Instantiate hooks of thirdparty module
|
||||||
* @param $type Type of hook
|
* @param $type Type of hook
|
||||||
@ -1232,8 +1261,15 @@ class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// All functions here must be moved into a hhtml class file
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show add predefined products/services form
|
* Show add predefined products/services form
|
||||||
|
* FIXME This must be moved into a html.class file instead of a business class.
|
||||||
*/
|
*/
|
||||||
function showAddPredefinedProductForm($dateSelector=0)
|
function showAddPredefinedProductForm($dateSelector=0)
|
||||||
{
|
{
|
||||||
@ -1245,6 +1281,7 @@ class CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Show add free products/services form
|
* Show add free products/services form
|
||||||
|
* FIXME This must be moved into a html.class file instead of a business class.
|
||||||
*/
|
*/
|
||||||
function showAddFreeProductForm($dateSelector=0)
|
function showAddFreeProductForm($dateSelector=0)
|
||||||
{
|
{
|
||||||
@ -1259,6 +1296,7 @@ class CommonObject
|
|||||||
* @param $object
|
* @param $object
|
||||||
* @param $objectid
|
* @param $objectid
|
||||||
* @param $somethingshown
|
* @param $somethingshown
|
||||||
|
* FIXME This must be moved into a html.class file instead of a business class.
|
||||||
*/
|
*/
|
||||||
function showLinkedObjectBlock($object,$objectid,$somethingshown=0)
|
function showLinkedObjectBlock($object,$objectid,$somethingshown=0)
|
||||||
{
|
{
|
||||||
@ -1283,7 +1321,7 @@ class CommonObject
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return HTML table with title list
|
* Return HTML table with title list
|
||||||
* TODO mettre le html dans un template
|
* FIXME This must be moved into a html.class file instead of a business class.
|
||||||
*/
|
*/
|
||||||
function print_title_list()
|
function print_title_list()
|
||||||
{
|
{
|
||||||
@ -1304,6 +1342,7 @@ class CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return HTML with object lines list
|
* Return HTML with object lines list
|
||||||
* @param lines Object lines
|
* @param lines Object lines
|
||||||
|
* FIXME This must be moved into a html.class file instead of a business class.
|
||||||
*/
|
*/
|
||||||
function printLinesList($lines,$dateSelector=0)
|
function printLinesList($lines,$dateSelector=0)
|
||||||
{
|
{
|
||||||
@ -1324,7 +1363,7 @@ class CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return HTML with selected object line
|
* Return HTML with selected object line
|
||||||
* @param line Selected object line
|
* @param line Selected object line
|
||||||
* TODO Move this into a html class, not a business class
|
* FIXME This must be moved into a html.class file instead of a business class.
|
||||||
*/
|
*/
|
||||||
function printLine($line,$var=true,$num=0,$i=0,$dateSelector=0)
|
function printLine($line,$var=true,$num=0,$i=0,$dateSelector=0)
|
||||||
{
|
{
|
||||||
@ -1564,36 +1603,6 @@ class CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* \brief Load type of canvas
|
|
||||||
* \param id element id
|
|
||||||
*/
|
|
||||||
function getCanvas($id)
|
|
||||||
{
|
|
||||||
global $conf;
|
|
||||||
|
|
||||||
$sql = "SELECT rowid, canvas";
|
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
|
||||||
$sql.= " WHERE entity = ".$conf->entity;
|
|
||||||
$sql.= " AND rowid = ".$id;
|
|
||||||
|
|
||||||
$resql = $this->db->query($sql);
|
|
||||||
if ($resql)
|
|
||||||
{
|
|
||||||
$obj = $this->db->fetch_object($resql);
|
|
||||||
|
|
||||||
$this->id = $obj->rowid;
|
|
||||||
$this->canvas = $obj->canvas;
|
|
||||||
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
dol_print_error($this->db);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user