You are here

function likebtn_update_7101 in Like Button 8.2

Same name and namespace in other branches
  1. 7 likebtn.install \likebtn_update_7101()

Move tag data to vote_source. Set tag to likebtn.

Change vote_source 'vote' to 'entity'.

File

./likebtn.install, line 106
Install, update and uninstall functions for the LikeBtn module.

Code

function likebtn_update_7101() {
  db_query("UPDATE {votingapi_vote} SET vote_source = tag, tag = '" . LIKEBTN_VOTING_TAG . "' WHERE vote_source in ('like', 'dislike')");
  db_query("UPDATE {votingapi_vote} SET vote_source = '" . LIKEBTN_VOTING_VOTE_SOURCE . "' WHERE vote_source = 'vote' and tag = '" . LIKEBTN_VOTING_TAG . "'");
}