Fix a bug in pagination where there aren't any items to show up
Users cannot post attachments if they do not own the topic
Merge pull request #2233 from mahagr/feature-hmvc

Fix a bug in pagination (no items) and fix permission check on attachments