Mini-refactor of popular-by post actions.
Update query to modern style.
Remove redundant assignment.