[ticket/11586] Combine administrator/moderator checks together.

PHPBB3-11586
[ticket/11586] Use a variable for $cat_id == ATTACHMENT_CATEGORY_IMAGE.

PHPBB3-11586
[ticket/11586] Combine $filedata['post_attach'] assign into a single statement.

PHPBB3-11586
[ticket/11586] Move $filedata['thumbnail'] to where it might be returned.

PHPBB3-11586
Merge remote-tracking branch 'bantu/ticket/11586' into develop

* bantu/ticket/11586:
  [ticket/11586] Move $filedata['thumbnail'] to where it might be returned.
  [ticket/11586] Combine $filedata['post_attach'] assign into a single statement.
  [ticket/11586] Use a variable for $cat_id == ATTACHMENT_CATEGORY_IMAGE.
  [ticket/11586] Combine administrator/moderator checks together.