Fix: Some checkstyle errors
This commit is contained in:
parent
66755fb166
commit
e7164cb243
@ -68,15 +68,15 @@ class Categorie
|
|||||||
*/
|
*/
|
||||||
function fetch($id,$label='')
|
function fetch($id,$label='')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
$sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type";
|
$sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie";
|
$sql.= " FROM ".MAIN_DB_PREFIX."categorie";
|
||||||
if ($id)
|
if ($id)
|
||||||
{
|
{
|
||||||
$sql.= " WHERE rowid = '".$id."'";
|
$sql.= " WHERE rowid = '".$id."'";
|
||||||
}
|
}
|
||||||
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if ($label) $sql.= " WHERE label = '".$this->db->escape($label)."' AND entity=".$conf->entity;;
|
if ($label) $sql.= " WHERE label = '".$this->db->escape($label)."' AND entity=".$conf->entity;;
|
||||||
@ -89,7 +89,7 @@ class Categorie
|
|||||||
if ($this->db->num_rows($resql) > 0)
|
if ($this->db->num_rows($resql) > 0)
|
||||||
{
|
{
|
||||||
$res = $this->db->fetch_array($resql);
|
$res = $this->db->fetch_array($resql);
|
||||||
|
|
||||||
$this->id = $res['rowid'];
|
$this->id = $res['rowid'];
|
||||||
$this->fk_parent = $res['fk_parent'];
|
$this->fk_parent = $res['fk_parent'];
|
||||||
$this->label = $res['label'];
|
$this->label = $res['label'];
|
||||||
@ -98,9 +98,9 @@ class Categorie
|
|||||||
$this->visible = $res['visible'];
|
$this->visible = $res['visible'];
|
||||||
$this->type = $res['type'];
|
$this->type = $res['type'];
|
||||||
$this->entity = $res['entity'];
|
$this->entity = $res['entity'];
|
||||||
|
|
||||||
$this->db->free($resql);
|
$this->db->free($resql);
|
||||||
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -702,9 +702,9 @@ class Categorie
|
|||||||
/**
|
/**
|
||||||
* Retourne toutes les categories
|
* Retourne toutes les categories
|
||||||
*
|
*
|
||||||
* @param int Type of category
|
* @param int $type Type of category
|
||||||
* @param boolean Just parent categories if true
|
* @param boolean $parent Just parent categories if true
|
||||||
* @return array Tableau d'objet Categorie
|
* @return array Tableau d'objet Categorie
|
||||||
*/
|
*/
|
||||||
function get_all_categories($type=null, $parent=false)
|
function get_all_categories($type=null, $parent=false)
|
||||||
{
|
{
|
||||||
@ -807,7 +807,7 @@ class Categorie
|
|||||||
/**
|
/**
|
||||||
* Retourne les categories de premier niveau (qui ne sont pas filles)
|
* Retourne les categories de premier niveau (qui ne sont pas filles)
|
||||||
*
|
*
|
||||||
* @param int Type of category
|
* @param int $type Type of category
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function get_main_categories($type=null)
|
function get_main_categories($type=null)
|
||||||
|
|||||||
@ -2049,4 +2049,4 @@ else
|
|||||||
// End of page
|
// End of page
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
?>
|
?>
|
||||||
@ -845,6 +845,7 @@ class Societe extends CommonObject
|
|||||||
* @param array $filters Array of couple field name/value to filter the companies with the same name
|
* @param array $filters Array of couple field name/value to filter the companies with the same name
|
||||||
* @param boolean $exact Exact string search (true/false)
|
* @param boolean $exact Exact string search (true/false)
|
||||||
* @param boolean $case Case sensitive (true/false)
|
* @param boolean $case Case sensitive (true/false)
|
||||||
|
* @param boolean $similar Add test if string inside name into database, or name into database inside string. Do not use this: Not compatible with other database.
|
||||||
* @param string $clause Clause for filters
|
* @param string $clause Clause for filters
|
||||||
* @return array Array of thirdparties object
|
* @return array Array of thirdparties object
|
||||||
*/
|
*/
|
||||||
@ -880,7 +881,8 @@ class Societe extends CommonObject
|
|||||||
$sql.= "(";
|
$sql.= "(";
|
||||||
if ($similar)
|
if ($similar)
|
||||||
{
|
{
|
||||||
// For test similitude
|
// For test similitude (string inside name into database, or name into database inside string)
|
||||||
|
// Do not use this. Not compatible with other database.
|
||||||
$sql.= "(LOCATE('".$this->db->escape($name)."', nom) > 0 OR LOCATE(nom, '".$this->db->escape($name)."') > 0)";
|
$sql.= "(LOCATE('".$this->db->escape($name)."', nom) > 0 OR LOCATE(nom, '".$this->db->escape($name)."') > 0)";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user