function likebtn_update_7100 in Like Button 8.2
Same name and namespace in other branches
- 7 likebtn.install \likebtn_update_7100()
Populate vote_source field in votingapi_vote table with like or dislike.
File
- ./
likebtn.install, line 96 - Install, update and uninstall functions for the LikeBtn module.
Code
function likebtn_update_7100() {
db_query("UPDATE {votingapi_vote} SET vote_source = 'like' WHERE vote_source = '' and uid = 0 and value_type = 'points' and value >= 0");
db_query("UPDATE {votingapi_vote} SET vote_source = 'dislike' WHERE vote_source = '' and uid = 0 and value_type = 'points' and value < 0");
}