renamed object_exists

This commit is contained in:
Cédric Salvador 2014-01-10 11:06:16 +01:00
parent e7f7dd49a5
commit abe76708de

View File

@ -578,7 +578,7 @@ class Categorie
* @param int $object_id id of the object to search
* @return int nb number of occurrences
*/
function object_exists($field, $category_table, $object_id)
function is_in_cat($field, $category_table, $object_id)
{
$sql = "SELECT COUNT(*) as nb FROM " . MAIN_DB_PREFIX . "categorie_" . $category_table;
$sql .= " WHERE fk_categorie = " . $this->id . " AND fk_" . $field . " = " . $object_id;