Fixes #1458 Deleting post reputation doesn't work

#1458
Cleaned up the code a bit. `$existing_post_reputation` and `$existing_reputation` needed multiple check so I've removed the first and added a `$was_post` variable which can be checked if we need to make a difference.