function _hashtags_index_remove in Hashtags 7
Remove hashtag index from database
Parameters
int $entity_id @see _hashtags_index_add() :
string $type @see _hashtags_index_add() :
int $tid @see _hashtags_index_add() :
int $comment_id @see _hashtags_index_add() :
Return value
TRUE, @TODO: try {} catch {}
2 calls to _hashtags_index_remove()
- hashtags_comment_presave in ./
hashtags.module - Implements hook_comment_presave().
- hashtags_entity_presave in ./
hashtags.module - Implementation of hook_entity_presave().
File
- ./
hashtags.module, line 512
Code
function _hashtags_index_remove($entity_id, $type, $tid, $comment_id = NULL) {
db_delete('hashtags_index')
->condition('entity_id', $entity_id)
->condition('type', $type)
->condition('tid', $tid)
->condition('comment_id', $comment_id)
->execute();
// return the number hashtags that still is
// attached to entity
return _hashtags_index_get_tags_count($entity_id, $type, $tid);
}