/** * Allow to change the current cat_id by the new * * @param integer $cid The contact_id what you want to edit * @param array $categories The new categories * @param $action * @return string SQL update string */ function edit_category($cid, $categories = array(), $action = PHPGW_SQL_RETURN_SQL) { $contact = createObject('phpgwapi.contact_central'); $principal['cat_id'] = $this->get_categories($categories); return $contact->update($principal, phpgwapi_sql_criteria::_equal('contact_id', phpgwapi_sql::integer($cid)), $action); }