Fixing style errors.
This commit is contained in:
parent
9f130aa2af
commit
fc58d92db4
@ -2010,7 +2010,7 @@ class Categorie extends CommonObject
|
|||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Count all categories
|
* Count all categories
|
||||||
@ -2019,20 +2019,19 @@ class Categorie extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public function count_all_categories()
|
public function count_all_categories()
|
||||||
{
|
{
|
||||||
dol_syslog(get_class($this)."::count_all_categories", LOG_DEBUG);
|
dol_syslog(get_class($this)."::count_all_categories", LOG_DEBUG);
|
||||||
$sql = "SELECT COUNT(rowid) FROM ".MAIN_DB_PREFIX."categorie";
|
$sql = "SELECT COUNT(rowid) FROM ".MAIN_DB_PREFIX."categorie";
|
||||||
$sql .= " WHERE entity IN (".getEntity('category').")";
|
$sql .= " WHERE entity IN (".getEntity('category').")";
|
||||||
|
|
||||||
$res = $this->db->query($sql);
|
$res = $this->db->query($sql);
|
||||||
if ($res)
|
if ($res)
|
||||||
{
|
{
|
||||||
$obj = $this->db->fetch_object($res);
|
$obj = $this->db->fetch_object($res);
|
||||||
return $obj->count;
|
return $obj->count;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
dol_print_error($this->db);
|
||||||
dol_print_error($this->db);
|
return -1;
|
||||||
return -1;
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user