diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index dec5ebfea57..6c4d1ed0d23 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -68,15 +68,15 @@ class Categorie */ function fetch($id,$label='') { - global $conf; - + global $conf; + $sql = "SELECT rowid, fk_parent, entity, label, description, fk_soc, visible, type"; $sql.= " FROM ".MAIN_DB_PREFIX."categorie"; - if ($id) + if ($id) { $sql.= " WHERE rowid = '".$id."'"; } - + else { 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) { $res = $this->db->fetch_array($resql); - + $this->id = $res['rowid']; $this->fk_parent = $res['fk_parent']; $this->label = $res['label']; @@ -98,9 +98,9 @@ class Categorie $this->visible = $res['visible']; $this->type = $res['type']; $this->entity = $res['entity']; - + $this->db->free($resql); - + return 1; } else @@ -702,9 +702,9 @@ class Categorie /** * Retourne toutes les categories * - * @param int Type of category - * @param boolean Just parent categories if true - * @return array Tableau d'objet Categorie + * @param int $type Type of category + * @param boolean $parent Just parent categories if true + * @return array Tableau d'objet Categorie */ 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) * - * @param int Type of category + * @param int $type Type of category * @return void */ function get_main_categories($type=null) diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 6218400d7ce..35e03a80b49 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -2049,4 +2049,4 @@ else // End of page llxFooter(); $db->close(); -?> +?> \ No newline at end of file diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index b6df5c322f8..378cae1f8b0 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -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 boolean $exact Exact string search (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 * @return array Array of thirdparties object */ @@ -880,7 +881,8 @@ class Societe extends CommonObject $sql.= "("; 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)"; } else