From bdf4c0704b52c306cf75972573eb8ae3a514ef83 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 5 May 2018 13:40:45 +0200 Subject: [PATCH] Removed depreaceted not used method Categorie::get_nb_categories() --- ChangeLog | 2 +- htdocs/categories/class/categorie.class.php | 24 --------------------- 2 files changed, 1 insertion(+), 25 deletions(-) diff --git a/ChangeLog b/ChangeLog index 19ab1e0f49b..b800098144b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,7 +21,7 @@ Following changes may create regressions for some external modules, but were nec * Removed method fetch_prods() and get_each_prod() not used, keep only get_arbo_each_prod() that is better. * The hook contaxt commcard has been renamed thirdpartycomm * The hook contaxt thirdpartycard has been renamed thirdpartycontact - +* Remove method Categorie:get_nb_categories() that was not used. ***** ChangeLog for 7.0.1 compared to 7.0.0 ***** FIX: #8139 User search does not work if MAIN_USE_OLD_SEARCH_FORM, missing list.php diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index 5fa8d267830..0f28a8d1cde 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -1207,30 +1207,6 @@ class Categorie extends CommonObject } } - /** - * Returns total number of categories - * - * @return int Number of categories - * @deprecated function not used ? - */ - function get_nb_categories() - { - $sql = "SELECT count(rowid)"; - $sql.= " FROM ".MAIN_DB_PREFIX."categorie"; - $sql.= " WHERE entity IN (".getEntity('category').")"; - $res = $this->db->query($sql); - if ($res) - { - $res = $this->db->fetch_array($res); - return $res[0]; - } - else - { - dol_print_error($this->db); - return -1; - } - } - /** * Check if no category with same label already exists for this cat's parent or root and for this cat's type *